UNPKG

node-pkware

Version:

node.js implementation of StormLib's pkware compressor/de-compressor

45 lines (44 loc) 1.32 kB
import { Buffer } from 'node:buffer'; import type { Transform, TransformCallback } from 'node:stream'; import type { Config } from '../stream/types.js'; export declare class Explode { private readonly verbose; private needMoreInput; private isFirstChunk; private extraBits; private bitBuffer; private readonly backupData; private readonly lengthCodes; private readonly distPosCodes; private readonly inputBuffer; private readonly outputBuffer; private readonly stats; private compressionType; private dictionarySize; private dictionarySizeMask; private chBitsAsc; private asciiTable2C34; private asciiTable2D34; private asciiTable2E34; private asciiTable2EB4; constructor(config?: Config); getHandler(): (this: Transform, chunk: Buffer, encoding: NodeJS.BufferEncoding, callback: TransformCallback) => void; private generateAsciiTables; private onInputFinished; /** * @throws `AbortedError` when there isn't enough data to be wasted */ private wasteBits; /** * @throws `AbortedError` */ private decodeNextLiteral; /** * @throws `AbortedError` */ private decodeDistance; private processChunkData; private parseInitialData; private backup; private restore; }