gis-tools-ts
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
80 lines • 2.43 kB
TypeScript
import type { Reader } from '../..';
export declare const AC_HEADER_BYTE = 2;
export declare const AC_BUFFER_SIZE = 4096;
export declare const AC__MinLength = 16777216;
export declare const AC__MaxLength = 4294967295;
export declare const BM__LengthShift = 13;
export declare const BM__MaxCount = 8192;
export declare const DM__LengthShift = 15;
export declare const DM__MaxCount = 32768;
/**
* https://github.com/LASzip/LASzip/blob/master/src/arithmeticdecoder.cpp
*/
export declare class ArithmeticDecoder {
readonly reader: Reader;
value: number;
length: number;
/** @param reader - The input reader */
constructor(reader: Reader);
/** @param reallyInit - if set to true, initializes the value */
init(reallyInit?: boolean): void;
/**
* @param m - The arithmetic bit model
* @returns - The decoded bit
*/
decodeBit(m: ArithmeticBitModel): number;
/**
* @param m - The arithmetic model
* @returns - The decoded symbol
*/
decodeSymbol(m: ArithmeticModel): number;
/**
* @param bits - The number of bits
* @returns - The decoded bits
*/
readBits(bits: number): number;
/** @returns - The decoded short */
readShort(): number;
/** @returns - The decoded int */
readInt(): number;
/** @returns - The decoded int64 */
readInt64(): bigint;
/** Renormalize the decoder interval */
renormDecInterval(): void;
}
/** Arithmetic Model */
export declare class ArithmeticModel {
readonly symbols: number;
readonly compress: boolean;
distribution: number[];
symbolCountIndex: number;
decoderTableIndex: number;
totalCount: number;
updateCycle: number;
symbolsUntilUpdate: number;
lastSymbol: number;
tableSize: number;
tableShift: number;
/**
* @param symbols - The number of symbols
* @param compress - If the model has been compressed
*/
constructor(symbols: number, compress?: boolean);
/** @param table - The table */
init(table?: number[]): void;
/** Update the model */
update(): void;
}
/** Arithmetic Bit Model */
export declare class ArithmeticBitModel {
updateCycle: number;
bitsUntilUpdate: number;
bit0Prob: number;
bit0Count: number;
bitCount: number;
/** @returns - 0 */
init(): number;
/** Update the model */
update(): void;
}
//# sourceMappingURL=arithmeticDecoder.d.ts.map