@zip.js/zip.js 2.7.60 → 2.7.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/zip-fs-full.js +1 -8
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +1 -8
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +1 -8
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +1 -8
- package/dist/zip.min.js +1 -1
- package/index.cjs +1 -8
- package/index.d.ts +11 -11
- package/index.min.js +1 -1
- package/lib/core/zip-writer.js +1 -2
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -479,7 +479,7 @@ export interface ReadableReader {
|
|
|
479
479
|
* this.size = this.binaryString.length;
|
|
480
480
|
* }
|
|
481
481
|
*
|
|
482
|
-
*
|
|
482
|
+
* readCompatibleUint8Array(offset, length) {
|
|
483
483
|
* const result = new Uint8Array(length);
|
|
484
484
|
* for (let indexCharacter = 0; indexCharacter < length; indexCharacter++) {
|
|
485
485
|
* result[indexCharacter] = this.binaryString.charCodeAt(indexCharacter + offset) & 0xFF;
|
|
@@ -515,7 +515,7 @@ export class Reader<Type> implements Initializable, ReadableReader {
|
|
|
515
515
|
* @param length The length of the data to read in bytes.
|
|
516
516
|
* @returns A promise resolving to a chunk of data.
|
|
517
517
|
*/
|
|
518
|
-
|
|
518
|
+
readCompatibleUint8Array(index: number, length: number): Promise<Uint8Array>;
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
/**
|
|
@@ -536,7 +536,7 @@ export class Data64URIReader extends Reader<string> { }
|
|
|
536
536
|
/**
|
|
537
537
|
* Represents a {@link Reader} instance used to read data provided as a `Uint8Array` instance.
|
|
538
538
|
*/
|
|
539
|
-
export class
|
|
539
|
+
export class CompatibleUint8ArrayReader extends Reader<Uint8Array> { }
|
|
540
540
|
|
|
541
541
|
/**
|
|
542
542
|
* Represents a {@link Reader} instance used to read data provided as an array of {@link ReadableReader} instances (e.g. split zip files).
|
|
@@ -656,7 +656,7 @@ export interface WritableWriter {
|
|
|
656
656
|
* this.binaryString = "";
|
|
657
657
|
* }
|
|
658
658
|
*
|
|
659
|
-
*
|
|
659
|
+
* writeCompatibleUint8Array(array) {
|
|
660
660
|
* for (let indexCharacter = 0; indexCharacter < array.length; indexCharacter++) {
|
|
661
661
|
* this.binaryString += String.fromCharCode(array[indexCharacter]);
|
|
662
662
|
* }
|
|
@@ -686,7 +686,7 @@ export class Writer<Type> implements Initializable, WritableWriter {
|
|
|
686
686
|
*
|
|
687
687
|
* @virtual
|
|
688
688
|
*/
|
|
689
|
-
|
|
689
|
+
writeCompatibleUint8Array(array: Uint8Array): Promise<void>;
|
|
690
690
|
/**
|
|
691
691
|
* Retrieves all the written data
|
|
692
692
|
*
|
|
@@ -782,7 +782,7 @@ export class SplitDataWriter implements Initializable, WritableWriter {
|
|
|
782
782
|
/**
|
|
783
783
|
* Represents a {@link Writer} instance used to retrieve the written data as a `Uint8Array` instance.
|
|
784
784
|
*/
|
|
785
|
-
export class
|
|
785
|
+
export class CompatibleUint8ArrayWriter extends Writer<Uint8Array> { }
|
|
786
786
|
|
|
787
787
|
/**
|
|
788
788
|
* Represents an instance used to create an unzipped stream.
|
|
@@ -1751,7 +1751,7 @@ export class ZipFileEntry<ReaderType, WriterType> extends ZipEntry {
|
|
|
1751
1751
|
* @param options The options.
|
|
1752
1752
|
* @returns A promise resolving to a `Uint8Array` instance.
|
|
1753
1753
|
*/
|
|
1754
|
-
|
|
1754
|
+
getCompatibleUint8Array(options?: EntryGetDataOptions): Promise<Uint8Array>;
|
|
1755
1755
|
/**
|
|
1756
1756
|
* Retrieves the content of the entry via a `WritableStream` instance
|
|
1757
1757
|
*
|
|
@@ -1801,7 +1801,7 @@ export class ZipFileEntry<ReaderType, WriterType> extends ZipEntry {
|
|
|
1801
1801
|
*
|
|
1802
1802
|
* @param array The `Uint8Array` instance.
|
|
1803
1803
|
*/
|
|
1804
|
-
|
|
1804
|
+
replaceCompatibleUint8Array(array: Uint8Array): void;
|
|
1805
1805
|
/**
|
|
1806
1806
|
* Replaces the content of the entry with a `ReadableStream` instance
|
|
1807
1807
|
*
|
|
@@ -1883,7 +1883,7 @@ export class ZipDirectoryEntry extends ZipEntry {
|
|
|
1883
1883
|
* @param options The options.
|
|
1884
1884
|
* @returns A {@link ZipFileEntry} instance.
|
|
1885
1885
|
*/
|
|
1886
|
-
|
|
1886
|
+
addCompatibleUint8Array(
|
|
1887
1887
|
name: string,
|
|
1888
1888
|
array: Uint8Array,
|
|
1889
1889
|
options?: ZipWriterAddDataOptions,
|
|
@@ -1973,7 +1973,7 @@ export class ZipDirectoryEntry extends ZipEntry {
|
|
|
1973
1973
|
* @param array The `Uint8Array` instance.
|
|
1974
1974
|
* @param options The options.
|
|
1975
1975
|
*/
|
|
1976
|
-
|
|
1976
|
+
importCompatibleUint8Array(
|
|
1977
1977
|
array: Uint8Array,
|
|
1978
1978
|
options?: ZipReaderConstructorOptions,
|
|
1979
1979
|
): Promise<[ZipEntry]>;
|
|
@@ -2033,7 +2033,7 @@ export class ZipDirectoryEntry extends ZipEntry {
|
|
|
2033
2033
|
* @param options The options.
|
|
2034
2034
|
* @returns A promise resolving to the `Uint8Array` instance.
|
|
2035
2035
|
*/
|
|
2036
|
-
|
|
2036
|
+
exportCompatibleUint8Array(
|
|
2037
2037
|
options?: ZipDirectoryEntryExportOptions,
|
|
2038
2038
|
): Promise<Uint8Array>;
|
|
2039
2039
|
/**
|