Expand description
Resume support.
The receiver keeps a bitmap of chunks it already holds, persisted next to
the .part file. On reconnect it sends that bitmap and the sender skips
those chunks.
The ordering here is the part that matters. A chunk is only recorded as present after the data file has been flushed to stable storage. Recording first and flushing later would produce a state file claiming chunks that a power loss silently discarded — a resumed transfer would then complete with a hole in the middle and a hash mismatch, or worse, no hash configured and quiet corruption.
Structs§
- Chunk
Bitmap - One bit per chunk, LSB first within each byte.
- Resume
State - On-disk resume state for one file.