bytebuf icon indicating copy to clipboard operation
bytebuf copied to clipboard

Automatically resize as needed

Open hpx7 opened this issue 4 years ago • 0 comments

Instead of being a fixed length, it would be nice if I could initialize it without a length like new ByteBuf() or similar. Then, an internal buffer could grow over time as needed.

The design tradeoff of having an internal buffer vs extending DataView directly is probably that you would need some kind of toBuffer() method that would return a view only up until the current byteOffset.

hpx7 avatar Sep 15 '21 04:09 hpx7