Class: Unzip

May 16, 2026 ยท View on GitHub

fflate


Class: Unzip

A ZIP archive decompression stream that emits files as they are discovered

Constructors

Constructor

new Unzip(cb?: UnzipFileHandler): Unzip

Creates a ZIP decompression stream

Parameters

cb?

UnzipFileHandler

The callback to call whenever a file in the ZIP archive is found

Returns

Unzip

Properties

onfile

onfile: UnzipFileHandler

The handler to call whenever a file is discovered

Methods

push()

push(chunk: Uint8Array, final?: boolean): void

Pushes a chunk to be unzipped

Parameters

chunk

Uint8Array

The chunk to push

final?

boolean

Whether this is the last chunk

Returns

void


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