Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ZipPassThrough

A pass-through stream to keep data uncompressed in a ZIP archive.

class ZipPassThrough implements ZipInputFile {
constructor(filename: string);
private c;
attrs?: number;
comment?: string;
compression: number;
crc: number;
extra?: Record<number, Uint8Array>;
filename: string;
mtime?: GzipOptions["mtime"];
os?: number;
size: number;
 
protected process(chunk: Uint8Array, final: boolean): void;
push(chunk: Uint8Array, final?: boolean): void;
}

§Implements

§Constructors

§
new ZipPassThrough(filename: string)
[src]

Creates a pass-through stream that can be added to ZIP archives

@param filename

The filename to associate with this data stream

§Properties

§
attrs: number
[src]
§
comment: string
[src]
§
compression: number
[src]
§
crc: number
[src]
§
extra: Record<number, Uint8Array>
[src]
§
filename: string
[src]
§
mtime: GzipOptions["mtime"]
[src]
§
os: number
[src]
§
size: number
[src]

§Methods

§
process(chunk: Uint8Array, final: boolean): void protected
[src]

Processes a chunk and pushes to the output stream. You can override this method in a subclass for custom behavior, but by default this passes the data through. You must call this.ondata(err, chunk, final) at some point in this method.

@param chunk

The chunk to process

@param final

Whether this is the last chunk

§
push(chunk: Uint8Array, final?: boolean): void
[src]

Pushes a chunk to be added. If you are subclassing this with a custom compression algorithm, note that you must push data from the source file only, pre-compression.

@param chunk

The chunk to push

@param final

Whether this is the last chunk