asynczipdeflate.md 3.2 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 a DEFLATE stream that can be added to ZIP archives

Parameters:

Name Type Default value 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


compression

compression: number

Implementation of ZipInputFile.compression


crc

crc: number

Implementation of ZipInputFile.crc


filename

filename: string

Implementation of ZipInputFile.filename


flag

flag: 0 | 1 | 2 | 3

Implementation of ZipInputFile.flag


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