@zip.js/zip.js 2.6.18 → 2.6.19

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.
Files changed (140) hide show
  1. package/.eslintrc.json +0 -0
  2. package/README.md +0 -0
  3. package/cli-deno/mc-zip.js +0 -0
  4. package/dist/README.md +0 -0
  5. package/dist/z-worker-fflate.js +1 -1
  6. package/dist/z-worker-pako.js +1 -1
  7. package/dist/z-worker.js +1 -1
  8. package/dist/zip-fs-full.js +54 -42
  9. package/dist/zip-fs-full.min.js +1 -1
  10. package/dist/zip-fs.js +54 -42
  11. package/dist/zip-fs.min.js +1 -1
  12. package/dist/zip-full.js +49 -42
  13. package/dist/zip-full.min.js +1 -1
  14. package/dist/zip-no-worker-deflate.min.js +1 -1
  15. package/dist/zip-no-worker-inflate.min.js +1 -1
  16. package/dist/zip-no-worker.min.js +1 -1
  17. package/dist/zip.js +49 -42
  18. package/dist/zip.min.js +1 -1
  19. package/index-fflate.js +0 -0
  20. package/index.d.ts +11 -18
  21. package/index.js +0 -0
  22. package/lib/core/codec-interface.js +12 -1
  23. package/lib/core/codec-pool-worker.js +1 -0
  24. package/lib/core/codec-pool.js +0 -0
  25. package/lib/core/configuration.js +0 -0
  26. package/lib/core/constants.js +0 -0
  27. package/lib/core/io.js +11 -19
  28. package/lib/core/streams/aes-crypto-stream.js +0 -0
  29. package/lib/core/streams/codec-stream.js +0 -0
  30. package/lib/core/streams/codecs/crc32.js +0 -0
  31. package/lib/core/streams/codecs/deflate.js +0 -0
  32. package/lib/core/streams/codecs/inflate.js +0 -0
  33. package/lib/core/streams/codecs/sjcl.js +0 -0
  34. package/lib/core/streams/common-crypto.js +0 -0
  35. package/lib/core/streams/crc32-stream.js +0 -0
  36. package/lib/core/streams/zip-crypto-stream.js +0 -0
  37. package/lib/core/streams/zip-entry-stream.js +1 -9
  38. package/lib/core/util/cp437-decode.js +0 -0
  39. package/lib/core/util/decode-text.js +0 -0
  40. package/lib/core/util/default-mime-type.js +0 -0
  41. package/lib/core/util/encode-text.js +0 -0
  42. package/lib/core/util/mime-type.js +0 -0
  43. package/lib/core/util/stream-codec-shim.js +0 -0
  44. package/lib/core/z-worker-core.js +0 -0
  45. package/lib/core/zip-entry.js +0 -0
  46. package/lib/core/zip-fs-core.js +5 -0
  47. package/lib/core/zip-reader.js +0 -0
  48. package/lib/core/zip-writer.js +24 -12
  49. package/lib/z-worker-bootstrap-fflate.js +0 -0
  50. package/lib/z-worker-bootstrap-pako.js +0 -0
  51. package/lib/z-worker-fflate.js +0 -0
  52. package/lib/z-worker-inline-template-base64.js +0 -0
  53. package/lib/z-worker-inline-template.js +0 -0
  54. package/lib/z-worker-inline.js +1 -1
  55. package/lib/z-worker.js +0 -0
  56. package/lib/zip-fflate-shim.js +0 -0
  57. package/lib/zip-fs.js +0 -0
  58. package/lib/zip-full-fflate.js +0 -0
  59. package/lib/zip-full.js +0 -0
  60. package/lib/zip-no-worker-deflate.js +0 -0
  61. package/lib/zip-no-worker-fflate-deflate.js +0 -0
  62. package/lib/zip-no-worker-fflate-inflate.js +0 -0
  63. package/lib/zip-no-worker-fflate.js +0 -0
  64. package/lib/zip-no-worker-inflate.js +0 -0
  65. package/lib/zip-no-worker.js +0 -0
  66. package/lib/zip.js +0 -0
  67. package/package.json +1 -1
  68. package/rollup-fflate.config.dev.js +0 -0
  69. package/rollup-fflate.config.js +0 -0
  70. package/rollup.config.dev.js +0 -0
  71. package/rollup.config.js +0 -0
  72. package/tests/all/loader.html +0 -0
  73. package/tests/all/test-abort-signal-read.js +0 -0
  74. package/tests/all/test-abort-signal-write.js +0 -0
  75. package/tests/all/test-array.js +0 -0
  76. package/tests/all/test-base64.js +0 -0
  77. package/tests/all/test-blob.js +0 -0
  78. package/tests/all/test-codecs-interoperability.js +0 -0
  79. package/tests/all/test-crc.js +0 -0
  80. package/tests/all/test-crypto.js +0 -0
  81. package/tests/all/test-custom-io.js +0 -1
  82. package/tests/all/test-data-descriptor-signature.js +0 -0
  83. package/tests/all/test-data-descriptor.js +0 -0
  84. package/tests/all/test-duplicated-filename.js +0 -0
  85. package/tests/all/test-empty.js +0 -0
  86. package/tests/all/test-extended-timestamp.js +0 -0
  87. package/tests/all/test-extra-field.js +0 -0
  88. package/tests/all/test-fflate-no-worker.js +0 -0
  89. package/tests/all/test-fflate.js +0 -0
  90. package/tests/all/test-fs-base64.js +0 -0
  91. package/tests/all/test-fs-export-options.js +0 -0
  92. package/tests/all/test-fs-http-import.js +0 -0
  93. package/tests/all/test-fs-http-reader.js +0 -0
  94. package/tests/all/test-fs-replace.js +0 -0
  95. package/tests/all/test-fs-streams.js +0 -0
  96. package/tests/all/test-fs-text.js +0 -0
  97. package/tests/all/test-fs-unzip-store.js +0 -0
  98. package/tests/all/test-fs.js +0 -0
  99. package/tests/all/test-http-crypto.js +0 -0
  100. package/tests/all/test-http-range.js +0 -0
  101. package/tests/all/test-http-zip64.js +0 -0
  102. package/tests/all/test-invalid-crc.js +0 -0
  103. package/tests/all/test-multiple-writers.js +0 -0
  104. package/tests/all/test-no-worker.js +0 -0
  105. package/tests/all/test-pako-no-worker.js +0 -0
  106. package/tests/all/test-pako.js +0 -0
  107. package/tests/all/test-parallel-reads.js +0 -0
  108. package/tests/all/test-parallel-writes-auto-buffered.js +0 -0
  109. package/tests/all/test-parallel-writes-ordered.js +0 -0
  110. package/tests/all/test-parallel-writes.js +0 -0
  111. package/tests/all/test-readable-stream.js +0 -0
  112. package/tests/all/test-readable-zip-stream.js +0 -0
  113. package/tests/all/test-safe-closing.js +0 -0
  114. package/tests/all/test-store.js +0 -0
  115. package/tests/all/test-sw-worker.js +0 -0
  116. package/tests/all/test-sw.js +0 -0
  117. package/tests/all/test-worker-timeout.js +0 -0
  118. package/tests/all/test-wrapped.js +2 -2
  119. package/tests/all/test-writable-stream.js +0 -0
  120. package/tests/all/test-zip64-auto.js +3 -2
  121. package/tests/all/test-zip64-crypto.js +0 -0
  122. package/tests/all/test-zip64.js +0 -0
  123. package/tests/all/test-zipcrypto.js +0 -0
  124. package/tests/data/lorem-encrypted.zip +0 -0
  125. package/tests/data/lorem-invalid-crc.zip +0 -0
  126. package/tests/data/lorem-store.zip +0 -0
  127. package/tests/data/lorem-zip64.zip +0 -0
  128. package/tests/data/lorem.txt +0 -0
  129. package/tests/data/lorem.zip +0 -0
  130. package/tests/deno-runner.js +0 -0
  131. package/tests/index.html +0 -0
  132. package/tests/node-runner.js +0 -0
  133. package/tests/tests-data.js +0 -0
  134. package/tests/vendor/fflate-es2019.min.js +0 -0
  135. package/tests/vendor/fflate.min.js +0 -0
  136. package/tests/vendor/pako.min.js +0 -0
  137. package/tests/vendor/pako_deflate.min.js +0 -0
  138. package/tests/vendor/pako_inflate.min.js +0 -0
  139. package/tests/web-runner.js +0 -0
  140. package/tsconfig.json +0 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -21,7 +21,6 @@ class CustomBlobWriter extends zip.Writer {
21
21
  }
22
22
 
23
23
  writeUint8Array(array) {
24
- super.writeUint8Array(array);
25
24
  const writer = this;
26
25
  if (writer.arrayBuffers.length == writer.arrayBuffersMaxlength) {
27
26
  flushArrayBuffers(writer);
@@ -55,7 +54,8 @@ function flushArrayBuffers(blobWriter) {
55
54
  async function test() {
56
55
  zip.configure({ chunkSize: 128, useWebWorkers: true });
57
56
  const blobWriter = new CustomBlobWriter("application/zip");
58
- await blobWriter.writeUint8Array(PREPENDED_DATA);
57
+ blobWriter.writeUint8Array(PREPENDED_DATA);
58
+ blobWriter.writable.size = PREPENDED_DATA.length;
59
59
  const zipWriter = new zip.ZipWriter(blobWriter);
60
60
  await zipWriter.add(FILENAME, new zip.BlobReader(BLOB));
61
61
  await zipWriter.close(COMMENT);
File without changes
@@ -19,7 +19,6 @@ class CustomBlobWriter extends zip.Writer {
19
19
  }
20
20
 
21
21
  writeUint8Array(array) {
22
- super.writeUint8Array(array);
23
22
  const writer = this;
24
23
  if (writer.arrayBuffers.length == writer.arrayBuffersMaxlength) {
25
24
  flushArrayBuffers(writer);
@@ -53,9 +52,11 @@ function flushArrayBuffers(blobWriter) {
53
52
  async function test() {
54
53
  zip.configure({ chunkSize: 128, useWebWorkers: true });
55
54
  const blobWriter = new CustomBlobWriter("application/zip");
55
+ blobWriter.writable.size = 0;
56
56
  const array = new Uint8Array(64 * 1024 * 1024);
57
57
  for (let index = 0; index < 64; index++) {
58
- await blobWriter.writeUint8Array(array);
58
+ blobWriter.writeUint8Array(array);
59
+ blobWriter.writable.size += array.length;
59
60
  }
60
61
  const zipWriter = new zip.ZipWriter(blobWriter, { keepOrder: true });
61
62
  await zipWriter.add(FILENAME, new zip.BlobReader(BLOB));
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/tests/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/tsconfig.json CHANGED
File without changes