UNPKG

@thi.ng/rle-pack

Version:

Binary run-length encoding packer w/ flexible repeat bit widths

13 lines 625 B
export type RLESizes = [number, number, number, number]; /** * Compresses input using dynamically sized RLE compression and returns * result as `Uint8Array`. * * @param src - * @param num - number of input words * @param wordSize - in bits, range 1 - 32 * @param rleSizes - run-length group sizes (in bits, max. 16) */ export declare const encode: (src: Iterable<number>, num: number, wordSize?: number, rleSizes?: RLESizes) => Uint8Array<ArrayBuffer>; export declare const decode: (src: Uint8Array) => Uint8Array<ArrayBuffer> | Uint16Array<ArrayBuffer> | Uint32Array<ArrayBuffer>; //# sourceMappingURL=index.d.ts.map