Initial commit

This commit is contained in:
2026-04-15 17:08:39 +02:00
parent ae164c47a8
commit 47fd1c2b7a
1819 changed files with 685388 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import BitVector from "../vector/flat/bitVector.js";
/**
* Type constraint for TypedArray types that can be unpacked
*/
export type TypedArrayConstructor = Int32ArrayConstructor | Uint32ArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
export type TypedArrayInstance = Int32Array | Uint32Array | BigInt64Array | BigUint64Array | Float32Array | Float64Array;
/**
* Generic unpacking function.
* Reconstructs the full array by inserting default values at null positions.
*
* @param dataStream The compact data stream containing only non-null values
* @param presentBits BitVector indicating which positions have values (null if non-nullable)
* @param defaultValue The default value to insert at null positions (0, 0n, etc.)
* @returns Full array with default values at null positions
*/
export declare function unpackNullable<T extends TypedArrayInstance>(dataStream: T, presentBits: BitVector | null, defaultValue: number | bigint): T;
/**
* Special case for boolean columns because BitVector is not directly compatible with TypedArray.
*
* @param dataStream The compact BitVector data containing only non-null boolean values
* @param dataStreamSize The number of actual values in dataStream
* @param presentBits BitVector indicating which positions have values (null if non-nullable)
* @returns Uint8Array buffer for BitVector with false at null positions
*/
export declare function unpackNullableBoolean(dataStream: Uint8Array, dataStreamSize: number, presentBits: BitVector | null): Uint8Array;