Encodes an arbitrary-length sequence of bits as Weird64.
Weird64 surrounds the payload with two sentinel bits and pads the result to a six-bit boundary. This preserves the exact payload length, including trailing zero bits.
Bits to encode, represented as booleans.
A string containing exactly 64 unique characters.
The encoded Weird64 value.
encodeBooleans([true, false, true]); // "s" Copy
encodeBooleans([true, false, true]); // "s"
RangeError if the character set is invalid.
RangeError
Encodes an arbitrary-length sequence of bits as Weird64.
Weird64 surrounds the payload with two sentinel bits and pads the result to a six-bit boundary. This preserves the exact payload length, including trailing zero bits.