method

zlib.ZipBuffer.toBuffer

options?: string | CreateZipArchiveOptions
): Promise<NonSharedBuffer>;

Serializes the current set of entries - in the order they were added or read - into a fresh archive, switching to Zip64 structures automatically as needed (see zlib.createZipArchive()).

@param options

An archive comment, as a shorthand for { comment: options }. The comment defaults to zipBuffer.comment.

@returns

Promise fulfilled with a Buffer containing the serialized archive.

Referenced types

interface CreateZipArchiveOptions

  • baseOffset?: number

    Shifts every local/central header offset the archive records by this many bytes.

  • comment?: string

    An archive comment.