avoid downloading again already existing chunks
Closed this issue · 1 comments
drzraf commented
- Since we know where chunks are expected to be written before starting the download
and - Since chunks are written after they have be fully downloaded (and stored into memory)
Then it should be possible to avoid downloading chunks already present on-disk
The only possible issue with this are chunk partially written on-disk (eg: insufficient disk-space at the time of writing)
To avoid corrupted chunk being stored on-disk, a callback() could remove the partially written file (== if fs.writeFile()
returns an error)
nurrony commented
Thanks for opening this issue. I will start working on it as soon as I can allocate some bandwidth for this.