Skip to main content
Module

x/zipjs/index.js>ZipFileEntry

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
Go to Latest
class ZipFileEntry
extends ZipEntry
import { ZipFileEntry } from "https://deno.land/x/zipjs@v2.7.42/index.js";

Represents a file entry in the zip (Filesystem API).

Type Parameters

ReaderType
WriterType

Properties

directory: void

void for ZipFileEntry instances.

The Reader instance used to read the content of the entry.

writer:

The Writer instance used to write the content of the entry.

Methods

getBlob(mimeType?: string, options?: EntryGetDataOptions): Promise<Blob>

Retrieves the content of the entry as a Blob instance

getData(writer:
| Writer<unknown>
| AsyncGenerator<Writer<unknown> | WritableWriter | WritableStream>
, options?: EntryGetDataOptions
): Promise<unknown>

Retrieves the content of the entry via a Writer instance

getData64URI(mimeType?: string, options?: EntryGetDataOptions): Promise<string>

Retrieves the content of the entry as as a Data URI string encoded in Base64

getText(encoding?: string, options?: EntryGetDataOptions): Promise<string>

Retrieves the text content of the entry as a string

getUint8Array(options?: EntryGetDataOptions): Promise<Uint8Array>

Retrieves the content of the entry as a Uint8Array instance

Retrieves the content of the entry via a WritableStream instance

replaceBlob(blob: Blob): void

Replaces the content of the entry with a Blob instance

replaceData64URI(dataURI: string): void

Replaces the content of the entry with a Data URI string encoded in Base64

Replaces the content of the entry with a ReadableStream instance

replaceText(text: string): void

Replaces the content of the entry with a string

replaceUint8Array(array: Uint8Array): void

Replaces the content of the entry with a Uint8Array instance