Resuming a partial UnixFS download at a byte offset
A downloader stopped after writing a prefix of a large artifact. An immutable file CID and a trusted prefix length let a replacement worker fetch just the remainder.
Resume from the number of bytes already stored
Use a partial file tied to the exact FILE_CID and fresh output paths. If the prefix is 65,536 bytes long, its last byte has offset 65,535. The next read starts at 65,536. Writing the remainder separately keeps a failed request from changing the original partial file.
offset=$(wc -c < release.part)
ipfs cat --offset="$offset" "$FILE_CID" > remainder.bin &&
cat release.part remainder.bin > recovered.bin
Verify the assembled artifact before releasing it
Check the reconstructed length and expected file digest. The offset tells Kubo where to start, but cannot detect corruption in the prefix. If the source was originally an IPNS name, recover the file CID recorded when the transfer began. Resolving the name again could combine a prefix from one release with the tail of another. When the prefix is already the expected size, verify its digest before initiating any additional read.