yabase/base2

Values

pub fn decode(
  input: String,
) -> Result(BitArray, encoding.CodecError)

Decode a binary string to a BitArray. Input length must be a multiple of 8. Only “0” and “1” are valid.

pub fn encode(data: BitArray) -> String

Encode a BitArray to a binary string (e.g. <<0x41>> -> “01000001”).

Search Document