Whiteflag JavaScript Library - v1.0.0
    Preparing search index...
    • Function

      Shortens a Uint8Array to the length of the specified bits cropBits

      Parameters

      • u8array: Uint8Array

        the Uint8Array containing the bitset

      • nBits: number

        the number of used bits, or, if negative, the number of bits to remove

      Returns Uint8Array

      a new Uint8Array with the unused bits cleared