arraybuffer-sink
Source: quickjs-arraybuffer-sink.c — module export: ArrayBufferSink
An incremental byte accumulator (Bun-style ArrayBufferSink): write chunks, then
collect everything as a single ArrayBuffer.
Constructor
new ArrayBufferSink([options]) // length 1Methods / properties
| Member | Args | Kind | Description |
|---|---|---|---|
write(chunk) | 1 | method | Appends chunk (string/ArrayBuffer/typed array); returns bytes written. |
flush() | 0 | method | Returns the bytes accumulated so far and resets the buffer. |
end() | 0 | method | Finalizes the sink and returns the complete ArrayBuffer. |
size | — | getter | Number of bytes currently buffered. |
Export list
Generated by utilities/doc-api.js from the arraybuffer_sink dump of utilities/api-surface.sh: 8 members. Edit the text above this block, not the block.
ArrayBufferSink
class, constructible
- methods:
end(),flush(),write(),[Symbol.for('qjs.dynbuf')]() - properties:
size (get),[Symbol.toStringTag]