Weird64 API - v0.1.0
    Preparing search index...

    Function encodeBooleans

    • 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.

      Parameters

      • booleans: readonly boolean[]

        Bits to encode, represented as booleans.

      • charset: string = DEFAULT_CHARSET

        A string containing exactly 64 unique characters.

      Returns string

      The encoded Weird64 value.

      encodeBooleans([true, false, true]); // "s"
      

      RangeError if the character set is invalid.