toBytes(iter: AsyncIterable<StandardData>): AsyncIterable<Uint8Array>
Convert strings, string arrays, or byte arrays to Uint8Array chunks.
Conversion rules:
string: Converted to UTF-8 bytes with trailing newlinestring[]: Each string converted to UTF-8 with newline, concatenatedUint8Array: Passed through unchangedUint8Array[]: Concatenated into single array
Strings are always treated as lines (newline added). Bytes are treated as binary data.
iter: AsyncIterable<StandardData>
The iterable to convert.
AsyncIterable<Uint8Array>
An AsyncIterable of Uint8Array chunks.