@glitchybyte/dash
    Preparing search index...

    Class GBitBufferWriter

    Dynamic bit buffer writer.

    Buffer increases its capacity as needed.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Creates a writer ready to receive data.

      Parameters

      • bytes: null | ArrayBuffer = null

        Initial contents, or null to create an empty buffer.

      • expansionRate: number = 1.5

        Rate at which this buffer will grow when more space is needed.

      Returns GBitBufferWriter

    Accessors

    • get size(): number

      Size of buffer, in bytes.

      Returns number

    Methods

    • Extracts the used bytes.

      Note that if we had a partial byte, it will be written to the buffer. Any further writes will start at a new byte.

      Returns Uint8Array<ArrayBuffer>

    • Write a given number of bits.

      Parameters

      • bitCount: number

        Count of bits to write.

      • data: number

        Value of those bits.

      Returns void