feat(messaging-streams): manually deepen all six stream utility modules

- chunker: framed seq chunks, reassemble, setChunkSize
- multiplex: closeAll, getStream, per-stream byte counters
- backpressure: low/high water marks, bufferedBytes
- tee: branchBytes, removeBranch, depth guard
- transform: pipeTo and outbound backpressure
- resume-token: labeled checkpoints, clearTokens, bytesFromOffset
- Update category README and chunker tests

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:18:10 -04:00
co-authored by Cursor
parent 33a630fe83
commit 3e1c353ade
8 changed files with 266 additions and 63 deletions
@@ -8,7 +8,16 @@ test('split chunks', async (t) => {
const m = new HyperP2PStreamChunker({ chunkSize: 4 })
const parts = m.push(require('b4a').from('abcdefgh'))
t.is(parts.length, 2)
t.is(parts[0].length, 4)
t.is(parts[0].data.length, 4)
t.is(parts[0].seq, 0)
await m.close()
})
test('reassemble', async (t) => {
const m = new HyperP2PStreamChunker({ chunkSize: 3 })
m.push(require('b4a').from('hello'))
m.flush()
t.is(m.reassemble().toString(), 'hello')
await m.close()
})