[][src]Function urbit_q::encode

pub fn encode(input: &[u8]) -> String

Encodes data to Urbit's @q format

Note that when encoding more than one byte, it pads from the beginning to an even number of bytes (as per the original implementation, urbit-ob), e.g.

encode(&[1]); // nec
let string = encode(&[1, 2, 3]); // doznec-binwes
decode(&string).unwrap(); // [0, 1, 2, 3]