Module

x/zipjs/index.js>ZipFileEntry

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

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

Type Parameters

ReaderType
WriterType

Properties

directory: void

void for ZipFileEntry instances.

reader:
| ReadableStream
| Reader<unknown>[]
| ReadableStream[]

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

writer:
| WritableStream
| AsyncGenerator<Writer<unknown> | WritableWriter | WritableStream>

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>
| WritableStream
| 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

getWritable(writable?: WritableStream, options?: EntryGetDataOptions): Promise<WritableStream>

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

replaceReadable(readable: ReadableStream): void

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