Skip to main content
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.21/index.js";

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

Type Parameters

ReaderType
WriterType

Properties

directory: void

void for ZipFileEntry instances.

reader: Reader<ReaderType> | ReadableReader

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

writer: Writer<WriterType> | WritableWriter

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

Methods

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

Retrieves the content of the entry as a Blob instance

getData(writer: Writer<WriterType>, options?: EntryGetDataOptions): Promise<WriterType>

Retrieves the content of the entry via a Writer instance

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

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

getText(encoding: string | null | undefined, 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 | null | undefined, 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