Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ZipPassThrough

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

Hierarchy

  • ZipPassThrough

Index

Constructors

constructor

Properties

Optional attrs

attrs?: number

Optional comment

comment?: string

compression

compression: number

crc

crc: number

Optional extra

extra?: Record<number, Uint8Array>

filename

filename: string

Optional mtime

mtime?: string | number | Date

ondata

Optional os

os?: number

size

size: number

Methods

process

  • process(chunk: Uint8Array, final: boolean): void
  • 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.

    Parameters

    • chunk: Uint8Array

      The chunk to process

    • final: boolean

      Whether this is the last chunk

    Returns void

push

  • push(chunk: Uint8Array, final?: boolean): void
  • 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.

    Parameters

    • chunk: Uint8Array

      The chunk to push

    • Optional final: boolean

      Whether this is the last chunk

    Returns void

Generated using TypeDoc