Skip to content

FileEntry

Defined in: src/zip/zip.ts:200

Referred to as a “central directory” record in the spec. This is a file metadata entry inside the “central directory”.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.3.12

  • Uint8Array<ArrayBuffer, this>

TBuffer extends ArrayBufferLike = ArrayBuffer

[index: number]: number

new FileEntry<TBuffer>(buffer, byteOffset?, byteLength?): FileEntry

Defined in: node_modules/memium/dist/decorators.d.ts:62

TBuffer

number

number

FileEntry

$from.typed(Uint8Array)<TBuffer>.constructor

readonly [toStringTag]: "Uint8Array"

Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:282

$from.typed(Uint8Array).[toStringTag]


readonly buffer: ArrayBuffer

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2172

The ArrayBuffer instance referenced by the array.

$from.typed(Uint8Array).buffer


readonly byteLength: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2177

The length in bytes of the array.

$from.typed(Uint8Array).byteLength


readonly byteOffset: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2182

The offset in bytes of the array.

$from.typed(Uint8Array).byteOffset


readonly BYTES_PER_ELEMENT: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2167

The size in bytes of each element in the array.

$from.typed(Uint8Array).BYTES_PER_ELEMENT


readonly constructor: typeof FileEntry & Type<FileEntry<ArrayBuffer>>

Defined in: src/zip/zip.ts:203

The initial value of Object.prototype.constructor is the standard built-in Object constructor.


contents: Uint8Array

Defined in: src/zip/zip.ts:443

Gets the file data, and decompresses it if needed.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.3.8


readonly length: number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2281

The length of the array.

$from.typed(Uint8Array).length


readonly static alignment: number

Defined in: node_modules/memium/dist/structs.shared.d.ts:11

PosixHeader.alignment


readonly static optional array?: TypeArrayConstructor<ArrayBufferView<ArrayBufferLike>>

Defined in: node_modules/memium/dist/types.d.ts:14

$from.typed(Uint8Array).array


readonly static optional BYTES_PER_ELEMENT?: number

Defined in: node_modules/memium/dist/decorators.d.ts:65

$from.typed(Uint8Array).BYTES_PER_ELEMENT


readonly static optional isDynamic?: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:13

PosixHeader.isDynamic


readonly static isUnion: boolean

Defined in: node_modules/memium/dist/structs.shared.d.ts:12

PosixHeader.isUnion


static name: string = 'FileEntry'

Defined in: src/zip/zip.ts:201

Returns the name of the function. Function names are read-only and can not be changed.

PosixHeader.name


readonly static size: number

Defined in: node_modules/memium/dist/types.d.ts:13

PosixHeader.size

Defined in: src/zip/zip.ts:370


Defined in: src/zip/zip.ts:340


get $size(): number

Defined in: src/zip/zip.ts:388

The total size of the this entry

number


Defined in: src/zip/zip.ts:228

The upper byte of “version made by”, indicates the compatibility of the file attribute information.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.2


get comment(): string

Defined in: src/zip/zip.ts:378

The comment for this file

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.18

string


Defined in: src/zip/zip.ts:311

The length of the comment

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.12


Defined in: src/zip/zip.ts:287

The size of the file compressed

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.8


Defined in: src/zip/zip.ts:253

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.5%20compression%20method


Defined in: src/zip/zip.ts:281

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.7


get data(): Uint8Array

Defined in: src/zip/zip.ts:448

Uint8Array


Defined in: src/zip/zip.ts:258

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.6


Defined in: src/zip/zip.ts:331

The mapping of the external attributes is host-system dependent. For MS-DOS, the low order byte is the MS-DOS directory attribute byte. If input came from standard input, this field is set to zero.


Defined in: src/zip/zip.ts:368

This should be used for storage expansion.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.28


Defined in: src/zip/zip.ts:305

The length of the extra field

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.11


Defined in: src/zip/zip.ts:240

General purpose bit flags

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.4


Defined in: src/zip/zip.ts:338

This is the offset from the start of the first disk on which this file appears to where the local header should be found.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.16


Defined in: src/zip/zip.ts:322

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.14


get isDirectory(): boolean

Defined in: src/zip/zip.ts:396

Whether this entry is a directory

boolean


get isEncrypted(): boolean

Defined in: src/zip/zip.ts:246

boolean


get isFile(): boolean

Defined in: src/zip/zip.ts:410

Whether this entry is a file

boolean


get lastModified(): Date

Defined in: src/zip/zip.ts:265

The date and time are encoded in standard MS-DOS format. This getter decodes the date.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.6

Date

set lastModified(value): void

Defined in: src/zip/zip.ts:274

The date and time are encoded in standard MS-DOS format. This getter decodes the date.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.6

Date

void


get name(): string

Defined in: src/zip/zip.ts:359

The name of the file, with optional relative path. The filename is preloaded here, since looking it up is expensive.

4.4.17.1 claims:

  • All slashes are forward (‘/’) slashes.
  • Filename doesn’t begin with a slash.
  • No drive letters
  • If filename is missing, the input came from standard input.

Unfortunately, this isn’t true in practice. Some Windows zip utilities use a backslash here, but the correct Unix-style path in file headers. To avoid seeking all over the file to recover the known-good filenames from file headers, we simply convert ’' to ‘/’ here.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.17

string


Defined in: src/zip/zip.ts:299

The length of the file name

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.10


Defined in: src/zip/zip.ts:208


Defined in: src/zip/zip.ts:317

The number of the disk on which this file begins.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.13


Defined in: src/zip/zip.ts:293

The size of the file uncompressed

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.9


get useUTF8(): boolean

Defined in: src/zip/zip.ts:242

boolean


Defined in: src/zip/zip.ts:234

The minimum supported ZIP specification version needed to extract the file.

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.3


Defined in: src/zip/zip.ts:222

The lower byte of “version made by”, indicates the ZIP specification version supported by the software used to encode the file. major — floor zipVersion / 10 minor — zipVersion mod 10

http://pkware.com/documents/casestudies/APPNOTE.TXT#:~:text=4.4.2

[iterator](): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:311

ArrayIterator<number>

$from.typed(Uint8Array).[iterator]


at(index): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2022.array.d.ts:46

Returns the item located at the specified index.

number

The zero-based index of the desired code unit. A negative index will count back from the last item.

number | undefined

$from.typed(Uint8Array).at


check(): void

Defined in: src/zip/zip.ts:210

void


copyWithin(target, start, end?): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2193

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

number

If target is negative, it is treated as length+target where length is the length of the array.

number

If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

number

If not specified, length of the this object is used as its default value.

this

$from.typed(Uint8Array).copyWithin


entries(): ArrayIterator<[number, number]>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:316

Returns an array of key, value pairs for every entry in the array

ArrayIterator<[number, number]>

$from.typed(Uint8Array).entries


every(predicate, thisArg?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2203

Determines whether all the members of an array satisfy the specified test.

(value, index, array) => unknown

A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

$from.typed(Uint8Array).every


fill(value, start?, end?): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2213

Changes all array elements from start to end index to a static value and returns the modified array

number

value to fill array section with

number

index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

number

index to stop filling the array at. If end is negative, it is treated as length+end.

this

$from.typed(Uint8Array).fill


filter(predicate, thisArg?): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2222

Returns the elements of an array that meet the condition specified in a callback function.

(value, index, array) => any

A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).filter


find(predicate, thisArg?): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2233

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

(value, index, obj) => boolean

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number | undefined

$from.typed(Uint8Array).find


findIndex(predicate, thisArg?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2244

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

(value, index, obj) => boolean

find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number

$from.typed(Uint8Array).findIndex


findLast<S>(predicate, thisArg?): S | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:238

Returns the value of the last element in the array where predicate is true, and undefined otherwise.

S extends number

(value, index, array) => value is S

findLast calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLast immediately returns that element value. Otherwise, findLast returns undefined.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

S | undefined

$from.typed(Uint8Array).findLast

findLast(predicate, thisArg?): number | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:246

(value, index, array) => unknown

any

number | undefined

$from.typed(Uint8Array).findLast


findLastIndex(predicate, thisArg?): number

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:260

Returns the index of the last element in the array where predicate is true, and -1 otherwise.

(value, index, array) => unknown

findLastIndex calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.

any

If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

number

$from.typed(Uint8Array).findLastIndex


forEach(callbackfn, thisArg?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2253

Performs the specified action for each element in an array.

(value, index, array) => void

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

void

$from.typed(Uint8Array).forEach


includes(searchElement, fromIndex?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es2016.array.include.d.ts:50

Determines whether an array includes a certain element, returning true or false as appropriate.

number

The element to search for.

number

The position in this array at which to begin searching for searchElement.

boolean

$from.typed(Uint8Array).includes


indexOf(searchElement, fromIndex?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2261

Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

number

The value to locate in the array.

number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

$from.typed(Uint8Array).indexOf


join(separator?): string

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2268

Adds all the elements of an array separated by the specified separator string.

string

A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.

string

$from.typed(Uint8Array).join


keys(): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:321

Returns an list of keys in the array

ArrayIterator<number>

$from.typed(Uint8Array).keys


lastIndexOf(searchElement, fromIndex?): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2276

Returns the index of the last occurrence of a value in an array, or -1 if it is not present.

number

The value to locate in the array.

number

The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

number

$from.typed(Uint8Array).lastIndexOf


loadContents(force?): void | Promise<void>

Defined in: src/zip/zip.ts:414

boolean = false

void | Promise<void>


map(callbackfn, thisArg?): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2291

Calls a defined callback function on each element of an array, and returns an array that contains the results.

(value, index, array) => number

A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).map


reduce(callbackfn): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2303

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

(previousValue, currentValue, currentIndex, array) => number

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

number

$from.typed(Uint8Array).reduce

reduce(callbackfn, initialValue): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2304

(previousValue, currentValue, currentIndex, array) => number

number

number

$from.typed(Uint8Array).reduce

reduce<U>(callbackfn, initialValue): U

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2316

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

U

(previousValue, currentValue, currentIndex, array) => U

A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

U

$from.typed(Uint8Array).reduce


reduceRight(callbackfn): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2328

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

(previousValue, currentValue, currentIndex, array) => number

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

number

$from.typed(Uint8Array).reduceRight

reduceRight(callbackfn, initialValue): number

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2329

(previousValue, currentValue, currentIndex, array) => number

number

number

$from.typed(Uint8Array).reduceRight

reduceRight<U>(callbackfn, initialValue): U

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2341

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

U

(previousValue, currentValue, currentIndex, array) => U

A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

U

If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

U

$from.typed(Uint8Array).reduceRight


reverse(): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2346

Reverses the elements in an Array.

this

$from.typed(Uint8Array).reverse


set(array, offset?): void

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2353

Sets a value or an array of values.

ArrayLike<number>

A typed or untyped array of values to set.

number

The index in the current array at which the values are to be written.

void

$from.typed(Uint8Array).set


setFromBase64(string, options?): object

Defined in: ../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts:38

Sets the Uint8Array from a base64-encoded string.

string

The base64-encoded string.

If provided, specifies the alphabet and handling of the last chunk.

"base64" | "base64url"

"loose" | "strict" | "stop-before-partial"

object

An object containing the number of bytes read and written.

read: number

written: number

If the input string contains characters outside the specified alphabet, or if the last chunk is inconsistent with the lastChunkHandling option.

$from.typed(Uint8Array).setFromBase64


setFromHex(string): object

Defined in: ../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts:60

Sets the Uint8Array from a base16-encoded string.

string

The base16-encoded string.

object

An object containing the number of bytes read and written.

read: number

written: number

$from.typed(Uint8Array).setFromHex


slice(start?, end?): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2360

Returns a section of an array.

number

The beginning of the specified portion of the array.

number

The end of the specified portion of the array. This is exclusive of the element at the index ‘end’.

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).slice


some(predicate, thisArg?): boolean

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2370

Determines whether the specified callback function returns true for any element of an array.

(value, index, array) => unknown

A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.

any

An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

boolean

$from.typed(Uint8Array).some


sort(compareFn?): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2381

Sorts an array.

(a, b) => number

Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they’re equal and a positive value otherwise. If omitted, the elements are sorted in ascending order.

[11,2,22,1].sort((a, b) => a - b)

this

$from.typed(Uint8Array).sort


subarray(begin?, end?): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2389

Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.

number

The index of the beginning of the array.

number

The index of the end of the array.

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).subarray


toBase64(options?): string

Defined in: ../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts:23

Converts the Uint8Array to a base64-encoded string.

If provided, sets the alphabet and padding behavior used.

"base64" | "base64url"

boolean

string

A base64-encoded string.

$from.typed(Uint8Array).toBase64


toHex(): string

Defined in: ../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts:53

Converts the Uint8Array to a base16-encoded string.

string

A base16-encoded string.

$from.typed(Uint8Array).toHex


toLocaleString(): string

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2394

Converts a number to a string by using the current locale.

string

$from.typed(Uint8Array).toLocaleString

toLocaleString(locales, options?): string

Defined in: ../../node_modules/typescript/lib/lib.es2015.core.d.ts:566

string | string[]

NumberFormatOptions

string

$from.typed(Uint8Array).toLocaleString


toReversed(): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:268

Copies the array and returns the copy with the elements in reverse order.

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).toReversed


toSorted(compareFn?): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:280

Copies and sorts the array.

(a, b) => number

Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they’re equal, and a positive value otherwise. If omitted, the elements are sorted in ascending order.

const myNums = Uint8Array.from([11, 2, 22, 1]);
myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]

Uint8Array<ArrayBuffer>

$from.typed(Uint8Array).toSorted


toString(): string

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2399

Returns a string representation of an array.

string

$from.typed(Uint8Array).toString


valueOf(): this

Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:2402

Returns the primitive value of the specified object.

this

$from.typed(Uint8Array).valueOf


values(): ArrayIterator<number>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:326

Returns an list of values in the array

ArrayIterator<number>

$from.typed(Uint8Array).values


with(index, value): Uint8Array<ArrayBuffer>

Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:289

Copies the array and inserts the given number at the provided index.

number

The index of the value to overwrite. If the index is negative, then it replaces from the end of the array.

number

The value to insert into the copied array.

Uint8Array<ArrayBuffer>

A copy of the original array with the inserted value.

$from.typed(Uint8Array).with


static get(this, buffer, offset): ArrayBufferView

Defined in: node_modules/memium/dist/types.d.ts:17

Get a value from a buffer

void

ArrayBufferLike

number

ArrayBufferView

$from.typed(Uint8Array).get


static set(this, buffer, offset, value): void

Defined in: node_modules/memium/dist/types.d.ts:19

Set a value in a buffer

void

ArrayBufferLike

number

ArrayBufferView

void

$from.typed(Uint8Array).set