zipdeflate.md 3.5 KB

Class: ZipDeflate

Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate for better performance

Hierarchy

  • ZipDeflate

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

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

Creates a 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: ZipDeflate

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

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