Skip to main content

Module bytes

Module bytes 

Source
Expand description

Byte extraction: the one place a JS value becomes Vec<u8>.

BufferSource (an ArrayBuffer or any view over one), Node’s Buffer, an array of byte values, or a string in one of the encodings Buffer understands. Every consumer — crypto, the compression streams, Buffer.from, setInputFiles — reads through here rather than repeating the walk.

Functions§

buffer_source_bytes
A BufferSource: an ArrayBuffer, or a view over one.
value_to_bytes
Node’s Buffer.from lowering: a string in encoding, an array of byte values, another Buffer, or any BufferSource.