asynczipdeflate.md 3.8 KB

Class: AsyncZipDeflate

Asynchronous streaming DEFLATE compression for ZIP archives

Hierarchy

  • AsyncZipDeflate

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new AsyncZipDeflate(filename: string, opts?: DeflateOptions): AsyncZipDeflate

Creates an asynchronous DEFLATE stream that can be added to ZIP archives

Parameters:

Name Type Description
filename string The filename to associate with this data stream
opts? DeflateOptions The compression options

Returns: AsyncZipDeflate

Properties

attrs

Optional attrs: number

Implementation of ZipInputFile.attrs


comment

Optional comment: string

Implementation of ZipInputFile.comment


compression

compression: number

Implementation of ZipInputFile.compression


crc

crc: number

Implementation of ZipInputFile.crc


extra

Optional extra: Record<number, Uint8Array>

Implementation of ZipInputFile.extra


filename

filename: string

Implementation of ZipInputFile.filename


flag

flag: 0 | 1 | 2 | 3

Implementation of ZipInputFile.flag


mtime

Optional mtime: GzipOptions[\"mtime\"]

Implementation of ZipInputFile.mtime


ondata

ondata: AsyncFlateStreamHandler

Implementation of ZipInputFile.ondata


os

Optional os: number

Implementation of ZipInputFile.os


size

size: number

Implementation of ZipInputFile.size


terminate

terminate: AsyncTerminable

Implementation of ZipInputFile.terminate

Methods

process

process(chunk: Uint8Array, final: boolean): void

Parameters:

Name Type
chunk Uint8Array
final boolean

Returns: void


push

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

Pushes a chunk to be deflated

Parameters:

Name Type Description
chunk Uint8Array The chunk to push
final? boolean Whether this is the last chunk

Returns: void