Class Unzip
Index
Constructors
constructor
- new Unzip(cb?: UnzipFileHandler): Unzip
Creates a ZIP decompression stream
Parameters
Optional
cb: UnzipFileHandlerThe callback to call whenever a file in the ZIP archive is found
Returns Unzip
Methods
push
- push(chunk: Uint8Array<ArrayBufferLike>, final?: boolean): any
Pushes a chunk to be unzipped
Parameters
- chunk: Uint8Array<ArrayBufferLike>
The chunk to push
Optional
final: booleanWhether this is the last chunk
Returns any
- chunk: Uint8Array<ArrayBufferLike>
register
- register(decoder: UnzipDecoderConstructor): void
Registers a decoder with the stream, allowing for files compressed with the compression type provided to be expanded correctly
Parameters
- decoder: UnzipDecoderConstructor
The decoder constructor
Returns void
- decoder: UnzipDecoderConstructor
A ZIP archive decompression stream that emits files as they are discovered