import { toBytes } from "https://deno.land/x/proc@0.22.1/mod.ts";
Converts specific types to Uint8Array
chunks.
string
is converted toutf-8
, concatenating a trailinglf
string[]
each item in the array is converted toutf-8
, adding a trailinglf
, all concatenated to a singleUint8Array
Uint8Array
is passed on unchangedUint8Array[]
is concatenated to a singleUint8Array
Strings are always treated as lines, and we add a trailing lf
character. Data in
byte form is always treated strictly as binary data.