/** * @module heatshrink-utils * @external * @preferred * * This internal module contains private utility functions that are used inside * the heatshrink-ts package. They are not meant to be used externally nor are * they externally visible. */ import { HSBitstreamState } from "./heatshrink-basic"; /** * Get a specific number of bits from the input buffer. You can get between * 1 and 15 bits at a time and those bits are popped from the input buffer and * returned. If there are not enough bits remaining in buffer according to the * state information in state, then HS_NOBITS is returned as a sentinal value * and no bits are consumed from teh buffer. * * @param count The number of bits to return, must be in the range [1, 15] * @param state The current state of the input bitstream. This parameter is * modified with every invocation of this function to maintain state between * calls. * @param buffer A buffer of input data that will be used to retrieve a fixed * number of bits. This parameter is never modified. The state of what * bits have and have not been extracted is stored in the state parameter. * @returns The bits that were popped from the input buffer. If there are not * enough bits left in the buffer then HS_NOBITS is returned and state is left * unchanged. */ export declare function getBits(count: number, buffer: Uint8Array, state: HSBitstreamState): number;