Skip to content

pigeonhole-cp: never load the whole file into memory#61

Merged
david415 merged 2 commits into
mainfrom
pigeonhole-cp-streaming
Jun 6, 2026
Merged

pigeonhole-cp: never load the whole file into memory#61
david415 merged 2 commits into
mainfrom
pigeonhole-cp-streaming

Conversation

@david415

@david415 david415 commented Jun 6, 2026

Copy link
Copy Markdown
Member

The default send now writes each box directly, reading the file one box at a time, and is reached with no flag at all; COPY becomes the opt-in --copy. The windowed SACK paths, in both directions, now work a block of ten boxes at a time rather than buffering the entire payload, so they too hold only a block in memory. Each non-final write block is an exact multiple of the box size, so the box layout is identical to a single whole-file write and the receiver reads back the same stream.

Verified on the namenlos network: a twenty-thousand byte file spanning thirteen boxes round-trips byte-for-byte through --sack.

david415 added 2 commits June 6, 2026 15:07
The default send now writes each box directly, reading the file one box
at a time, and is reached with no flag at all; COPY becomes the opt-in
--copy. The windowed SACK paths, in both directions, now work a block of
ten boxes at a time rather than buffering the entire payload, so they too
hold only a block in memory. Each non-final write block is an exact
multiple of the box size, so the box layout is identical to a single
whole-file write and the receiver reads back the same stream.

Verified on the namenlos network: a twenty-thousand byte file spanning
thirteen boxes round-trips byte-for-byte through --sack.
The courier COPY command now governs send by default; --no-copy opts
out to the per-box streaming write. The flag, README, and smoke tests
are inverted to suit.
@david415 david415 merged commit ebaa6eb into main Jun 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant