byte_array_writer


byte_array_writer(@key transcoder)
      

Return a new output stream for writing unsigned bytes.

If transcoder is present, it must be a transcoder object, and byte_array_writer will return a textual output stream which will be encoded with transcoder. Otherwise, a binary output stream is returned.

Examples:


let bw = byte_array_writer()
write_bytes(#u8[100, 123, 42], bw)
get_output_bytes(bw)
// #u8[100, 123, 42]
      

Also see:

byte_array_reader


Core Module Index | Contents