-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Now when Writer runs out of space, it allocates a new 2x larger buffer an copies all the memory. Instead implemented as SegmentedWriter:
- SHOUL implement the same public API:
class SegmentedWriter implements Writer. - Introduce segments in the writer, distinct disjoint buffers. When
SegmentedWriterruns out of space it allocates a new segment, which is 2x larger than the last un-flushed segment in the buffer. The segment is appended to the segment listthis.segments.push(u8), not concatenated bit buffered data. - Join the buffers only on
.flush(). - The
.x(and other public APIs) should still work the same as inWriter. - Take special care to test methods that operate across segment splits.
Metadata
Metadata
Assignees
Labels
No labels