Open
Description
What is the problem this feature will solve?
Sequential buffer operations requires manual offset tracking. This is error-prone and verbose. Many developers already create abstractions around Buffer
to avoid it completely.
@nodejs/buffer
What is the feature you are proposing to solve the problem?
Introducing relative methods to Buffer
with automatic internal position tracking would simplify usage and improve developer experience in scenarios where data is read or written sequentially.
This is inspired by abstractions like Java’s ByteBuffer and Rust’s ByteBuffer.
It can be implemented in a backward-compatible manner by adding new get
and put
methods, without modifying existing read
or write
methods.
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Awaiting Triage