/** * The RLE / bit-packed hybrid, as dictionary indices need it. * * Two shapes share one stream, told apart by the low bit of a varint header: * * - **RLE run** — `varint(count << 1)` then the repeated value in * `ceil(bitWidth/8)` bytes. Cheap when values repeat consecutively. * - **Bit-packed run** — `varint((groups << 1) | 1)` then `groups × 8` values * packed LSB-first at `bitWidth` bits each. * * Which one matters. A categorical column ("Moscow", "Paris", "Berlin") is * SHUFFLED across rows, so consecutive repeats are rare and an RLE-only encoder * would spend about two bytes per value — barely better than what it replaced. * Bit-packed spends `bitWidth` BITS: two bits per value for three categories, * a 16× difference on the same data. So bit-packing is the default here and RLE * is kept only for the genuinely constant case. * * Values are accumulated with multiplication rather than `<<` on purpose: * shifting past 31 bits wraps in JavaScript, and a run can hold up to * `bitWidth + 7` bits before it flushes. * Spec: docs/specs/2026-07-19-parquet-statistics-and-encodings.md §3 */ /** Bits needed to address `count` distinct entries. `1` for a single entry. */ export declare function dictionaryBitWidth(count: number): number; /** * Encode dictionary indices for a data page. * * The result begins with a single byte holding the bit width — that byte is * part of the page body, not of the hybrid stream, and a reader expects it * exactly there. */ export declare function encodeDictionaryIndices(indices: readonly number[], bitWidth: number): Uint8Array; //# sourceMappingURL=rle.d.ts.map