28 lines
942 B
Markdown
28 lines
942 B
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Streaming package provides chunked pack/unpack
|
|
The `@suaveplan/bitpacker-streaming` package SHALL expose functions that pack/unpack values in chunks suitable for streaming I/O.
|
|
|
|
#### Scenario: Pack to chunks
|
|
- **WHEN** `packToChunks(data, schema, chunkSize)` is called
|
|
- **THEN** an iterable of `Uint8Array` chunks is returned, each at most `chunkSize` bytes
|
|
|
|
#### Scenario: Unpack from chunks
|
|
- **WHEN** `unpackFromChunks(chunks, schema)` is called with an async iterable of chunks
|
|
- **THEN** the original value is reconstructed
|
|
|
|
### Requirement: Streaming package supports AbortSignal
|
|
The `@suaveplan/bitpacker-streaming` package SHALL accept an optional `AbortSignal` on all iterative APIs.
|
|
|
|
#### Scenario: Abort mid-stream
|
|
- **WHEN** an `AbortSignal` is aborted during chunk processing
|
|
- **THEN** the operation throws an abort error
|
|
|
|
## MODIFIED Requirements
|
|
|
|
None.
|
|
|
|
## REMOVED Requirements
|
|
|
|
None.
|