@zip.js/zip.js 2.8.44 → 2.8.46

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 (61) hide show
  1. package/README.md +28 -2
  2. package/deno.json +32 -2
  3. package/dist/zip-core-external.js +199 -149
  4. package/dist/zip-core-external.min.js +1 -1
  5. package/dist/zip-core.js +196 -120
  6. package/dist/zip-core.min.js +1 -1
  7. package/dist/zip-fs-core-external.js +251 -157
  8. package/dist/zip-fs-core-external.min.js +1 -1
  9. package/dist/zip-fs-core.js +227 -126
  10. package/dist/zip-fs-core.min.js +1 -1
  11. package/dist/zip-fs-external.js +272 -1751
  12. package/dist/zip-fs-external.min.js +1 -1
  13. package/dist/zip-fs-native.js +273 -1726
  14. package/dist/zip-fs-native.min.js +1 -1
  15. package/dist/zip-fs.js +273 -1726
  16. package/dist/zip-fs.min.js +1 -1
  17. package/dist/zip-legacy.js +198 -122
  18. package/dist/zip-legacy.min.js +1 -1
  19. package/dist/zip-native.js +200 -124
  20. package/dist/zip-native.min.js +1 -1
  21. package/dist/zip-web-worker-native.js +1 -1
  22. package/dist/zip-web-worker.js +1 -1
  23. package/dist/zip.js +200 -124
  24. package/dist/zip.min.js +1 -1
  25. package/eslint.config.mjs +31 -2
  26. package/index-native.cjs +273 -1726
  27. package/index-native.min.js +1 -1
  28. package/index.cjs +273 -1726
  29. package/index.d.cts +140 -2
  30. package/index.d.ts +140 -2
  31. package/index.min.js +1 -1
  32. package/lib/core/codec-pool.js +3 -2
  33. package/lib/core/codec-worker.js +30 -14
  34. package/lib/core/configuration.js +20 -2
  35. package/lib/core/constants.js +4 -0
  36. package/lib/core/options.js +2 -0
  37. package/lib/core/streams/aes-crypto-stream.js +15 -18
  38. package/lib/core/streams/codec-stream.js +2 -2
  39. package/lib/core/streams/zip-entry-stream.js +13 -18
  40. package/lib/core/util/mime-type-data.js +3 -0
  41. package/lib/core/util/mime-type.js +23 -1596
  42. package/lib/core/web-worker-base.js +29 -2
  43. package/lib/core/web-worker-inline-native.js +1 -1
  44. package/lib/core/web-worker-inline-wasm.js +1 -1
  45. package/lib/core/web-worker-native.js +7 -9
  46. package/lib/core/web-worker-wasm.js +9 -12
  47. package/lib/core/zip-entry.js +8 -1
  48. package/lib/core/zip-fs.js +62 -5
  49. package/lib/core/zip-reader.js +45 -17
  50. package/lib/core/zip-writer.js +58 -44
  51. package/lib/{core/web-worker-inline-template.js → zip-core-custom.js} +13 -20
  52. package/lib/zip-core-external.js +2 -0
  53. package/lib/zip-fs-core-external.js +2 -0
  54. package/lib/zip-fs-external.js +2 -0
  55. package/lib/zip-mime-types.js +2 -0
  56. package/lib/zip-module-native.js +3 -3
  57. package/lib/zip-module-wasm-base.js +3 -3
  58. package/package.json +28 -4
  59. package/worker-message-property-names.js +1 -1
  60. package/lib/core/web-worker-inline-template-native.js +0 -48
  61. package/lib/core/zlib-streams-inline-template.js +0 -45
@@ -1,45 +0,0 @@
1
- /*
2
- Copyright (c) 2025 Gildas Lormeau. All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
-
7
- 1. Redistributions of source code must retain the above copyright notice,
8
- this list of conditions and the following disclaimer.
9
-
10
- 2. Redistributions in binary form must reproduce the above copyright
11
- notice, this list of conditions and the following disclaimer in
12
- the documentation and/or other materials provided with the distribution.
13
-
14
- 3. The names of the authors may not be used to endorse or promote products
15
- derived from this software without specific prior written permission.
16
-
17
- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
18
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
20
- INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
21
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
- */
28
-
29
- /* eslint-disable quotes */
30
-
31
- import { inflateRaw } from "./util/inflate.js";
32
- import { base64Decode, base64Encode } from "./util/base64.js";
33
-
34
- export function configureZlibModule(configure) {
35
- const data = `__wasmBinary__`;
36
- let dataURI;
37
- configure({
38
- wasmURI: () => {
39
- if (!dataURI) {
40
- dataURI = "data:application/wasm;base64," + base64Encode(inflateRaw(base64Decode(data)));
41
- }
42
- return dataURI;
43
- }
44
- });
45
- }