hyparquet
Version:
Parquet file parser for JavaScript
38 lines • 1.42 kB
TypeScript
/**
* ALP (Adaptive Lossless floating-Point) encoding decoder.
* Supports FLOAT and DOUBLE types.
*
* ALP encodes floating-point values by converting them to integers using
* decimal scaling, then applying frame of reference (FOR) encoding and
* bit-packing. Values that cannot be losslessly converted are stored as exceptions.
*
* See https://github.com/apache/parquet-format/blob/master/AlpEncoding.md
*/
import type { DataReader, DecodedArray, ParquetType } from '../src/types.d.ts';
/**
* Decode ALP encoded data.
*
* @import {DataReader, DecodedArray, ParquetType} from '../src/types.d.ts'
* @param {DataReader} reader - data reader positioned at start of ALP data
* @param {number} count - number of values to decode
* @param {ParquetType} type - FLOAT or DOUBLE
* @returns {DecodedArray} decoded float or double array
*/
export declare function alpDecode(reader: DataReader, count: number, type: ParquetType): DecodedArray;
/**
* Decode ALP encoded float data.
*
* @param {DataReader} reader
* @param {number} count
* @returns {Float32Array}
*/
export declare function alpDecodeFloat(reader: DataReader, count: number): Float32Array;
/**
* Decode ALP encoded double data.
*
* @param {DataReader} reader
* @param {number} count
* @returns {Float64Array}
*/
export declare function alpDecodeDouble(reader: DataReader, count: number): Float64Array;
//# sourceMappingURL=alp.d.ts.map