- @std/streams
buffer
- all symbols
- default
- buffer
- byte_slice_stream
- delimiter_stream
- early_zip_readable_streams
- iterate_reader
- limited_bytes_transform_stream
- limited_transform_stream
- merge_readable_streams
- readable_stream_from_reader
- reader_from_iterable
- reader_from_stream_reader
- text_delimiter_stream
- text_line_stream
- to_array_buffer
- to_blob
- to_json
- to_text
- to_transform_stream
- writable_stream_from_writer
- writer_from_stream_writer
- zip_readable_streams
Classes
A variable-sized buffer of bytes with read() and write() methods.
- bytes(options?): Uint8Array
Returns a slice holding the unread portion of the buffer.
- capacity(): number
The read only capacity of the buffer's underlying byte slice, that is, the total space allocated for the buffer's data.
- empty(): boolean
Returns whether the unread portion of the buffer is empty.
- grow(n: number): void
Grows the buffer's capacity, if necessary, to guarantee space for another
nbytes. After.grow(n), at leastnbytes can be written to the buffer without another allocation. Ifnis negative,.grow()will throw. If the buffer can't grow it will throw an error. - length(): number
A read only number of bytes of the unread portion of the buffer.
- readable(): ReadableStream<Uint8Array>
Getter returning the instance's
ReadableStream. - reset(): void
Resets to an empty buffer.
- truncate(n: number): void
Discards all but the first
nunread bytes from the buffer but continues to use the same allocated storage. It throws ifnis negative or greater than the length of the buffer. - writable(): WritableStream<Uint8Array>
Getter returning the instance's
WritableStream.