Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/zipjs/index.js>ZipFileEntry

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

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

Type Parameters

ReaderType
WriterType

Properties

directory: void

void for ZipFileEntry instances.

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

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

writer:
| WritableWriter
| 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>
| WritableWriter
| 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

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