rapier-jxl 2.2.0 → 2.2.1
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/AGENTS.md +23 -28
- package/README.md +63 -158
- package/{effort.min.mjs → dist/effort.min.mjs} +1 -1
- package/{jpeg-ans.min.mjs → dist/jpeg-ans.min.mjs} +1 -1
- package/{jpeg.min.mjs → dist/jpeg.min.mjs} +1 -1
- package/{photo-ans.min.mjs → dist/photo-ans.min.mjs} +1 -1
- package/{photo.min.mjs → dist/photo.min.mjs} +1 -1
- package/{rapier-jxl.min.mjs → dist/rapier-jxl.min.mjs} +1 -1
- package/{sizes.json → dist/sizes.json} +24 -24
- package/{wasm.min.mjs → dist/wasm.min.mjs} +1 -1
- package/{build-jxl-kernels.mjs → kernels/build.mjs} +6 -4
- package/package.json +32 -39
- package/ENCODER-COMPARISON.md +0 -185
- package/KERNELS.md +0 -58
- package/public/encoder-sizes.json +0 -355
- package/public/encoders.json +0 -139
- package/public/examples/browser.html +0 -39
- package/public/examples/worker.mjs +0 -42
- package/public/measure-encoders.mjs +0 -60
- /package/{kernels-probe.wat → kernels/kernels-probe.wat} +0 -0
- /package/{kernels-scalar.wat → kernels/kernels-scalar.wat} +0 -0
- /package/{kernels-simd.wat → kernels/kernels-simd.wat} +0 -0
- /package/{admit.mjs → src/admit.mjs} +0 -0
- /package/{ans.mjs → src/ans.mjs} +0 -0
- /package/{bits.mjs → src/bits.mjs} +0 -0
- /package/{coefficient-ans.mjs → src/coefficient-ans.mjs} +0 -0
- /package/{coefficient-effort.mjs → src/coefficient-effort.mjs} +0 -0
- /package/{effort-job.mjs → src/effort-job.mjs} +0 -0
- /package/{effort-level.mjs → src/effort-level.mjs} +0 -0
- /package/{effort.d.mts → src/effort.d.mts} +0 -0
- /package/{effort.mjs → src/effort.mjs} +0 -0
- /package/{entropy.mjs → src/entropy.mjs} +0 -0
- /package/{frame.mjs → src/frame.mjs} +0 -0
- /package/{index.d.mts → src/index.d.mts} +0 -0
- /package/{index.mjs → src/index.mjs} +0 -0
- /package/{jfif.mjs → src/jfif.mjs} +0 -0
- /package/{jpeg-ans.d.mts → src/jpeg-ans.d.mts} +0 -0
- /package/{jpeg-ans.mjs → src/jpeg-ans.mjs} +0 -0
- /package/{jpeg-job.mjs → src/jpeg-job.mjs} +0 -0
- /package/{jpeg.d.mts → src/jpeg.d.mts} +0 -0
- /package/{jpeg.mjs → src/jpeg.mjs} +0 -0
- /package/{kernel-control.d.mts → src/kernel-control.d.mts} +0 -0
- /package/{kernel-hooks.mjs → src/kernel-hooks.mjs} +0 -0
- /package/{kernels-bytes.mjs → src/kernels-bytes.mjs} +0 -0
- /package/{kernels.mjs → src/kernels.mjs} +0 -0
- /package/{local.mjs → src/local.mjs} +0 -0
- /package/{lossless-coding.mjs → src/lossless-coding.mjs} +0 -0
- /package/{lossless.mjs → src/lossless.mjs} +0 -0
- /package/{lossy.mjs → src/lossy.mjs} +0 -0
- /package/{modular.mjs → src/modular.mjs} +0 -0
- /package/{photo-ans.d.mts → src/photo-ans.d.mts} +0 -0
- /package/{photo-ans.mjs → src/photo-ans.mjs} +0 -0
- /package/{photo-dct.mjs → src/photo-dct.mjs} +0 -0
- /package/{photo-job.mjs → src/photo-job.mjs} +0 -0
- /package/{photo-quant.mjs → src/photo-quant.mjs} +0 -0
- /package/{photo.d.mts → src/photo.d.mts} +0 -0
- /package/{photo.mjs → src/photo.mjs} +0 -0
- /package/{pool.mjs → src/pool.mjs} +0 -0
- /package/{prefix.mjs → src/prefix.mjs} +0 -0
- /package/{rct-search.mjs → src/rct-search.mjs} +0 -0
- /package/{squeeze.mjs → src/squeeze.mjs} +0 -0
- /package/{vardct.mjs → src/vardct.mjs} +0 -0
- /package/{wasm.d.mts → src/wasm.d.mts} +0 -0
- /package/{wasm.mjs → src/wasm.mjs} +0 -0
- /package/{weighted.mjs → src/weighted.mjs} +0 -0
- /package/{writer.mjs → src/writer.mjs} +0 -0
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"asOf": "2026-09-30",
|
|
3
|
-
"node": "v22.22.2",
|
|
4
|
-
"terser": "5.51.2",
|
|
5
|
-
"scope": "Published executable JavaScript/WebAssembly encoder payloads found through npm jpeg-xl/jpegxl/jxl searches and upstream repositories; single-thread variants. Decoder-only packages are identified, not ranked. No claim of an exhaustive internet census or the minimum possible build.",
|
|
6
|
-
"method": "Sum of listed JavaScript and WASM resources. Terser compress passes=2, mangle=true, preserved license comments; WASM unchanged. gzip level9 per resource, summed, not npm archive size. No tree-shaking across resources, WASM optimization or invented rebuild. Factory-only entries omit optional convenience wrappers, workers, threaded variants and decoders; that favors competitors. Capability is documented upstream, not a conformance result from this size survey.",
|
|
7
|
-
"entries": [
|
|
8
|
-
{
|
|
9
|
-
"name": "@jsquash/jxl",
|
|
10
|
-
"version": "1.3.0",
|
|
11
|
-
"tarball": "https://registry.npmjs.org/@jsquash/jxl/-/jxl-1.3.0.tgz",
|
|
12
|
-
"integrity": "sha512-IVOPTneyOd9eBAuow+FnCYIP6wkIc7CjrCDnZGiqAPyJ63vMVxv3zoWiucGiZVh6u9vi/l40AkcS9QwkoVSAqA==",
|
|
13
|
-
"files": [
|
|
14
|
-
{
|
|
15
|
-
"path": "codec/enc/jxl_enc.js",
|
|
16
|
-
"bytes": 47073,
|
|
17
|
-
"gzip": 13132,
|
|
18
|
-
"minified": 24748,
|
|
19
|
-
"minifiedGzip": 8927,
|
|
20
|
-
"sha256": "5bb33d2a204f43035bfca2c581aff28669706aedae93188372c5d5c81532f8a8"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": "codec/enc/jxl_enc.wasm",
|
|
24
|
-
"bytes": 1363824,
|
|
25
|
-
"gzip": 516855,
|
|
26
|
-
"minified": 1363824,
|
|
27
|
-
"minifiedGzip": 516855,
|
|
28
|
-
"sha256": "3c6c02df45c0dededab146888789d541b23b9a299cb16d497dce412a3a4bc7d3"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"capability": "8-bit lossless/lossy RGBA; single-thread encoder factory",
|
|
32
|
-
"encoder": true,
|
|
33
|
-
"source": "git+https://github.com/jamsinclair/jSquash.git",
|
|
34
|
-
"total": {
|
|
35
|
-
"bytes": 1410897,
|
|
36
|
-
"gzip": 529987,
|
|
37
|
-
"minified": 1388572,
|
|
38
|
-
"minifiedGzip": 525782
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "@discourse/jxl",
|
|
43
|
-
"version": "1.3.0",
|
|
44
|
-
"tarball": "https://registry.npmjs.org/@discourse/jxl/-/jxl-1.3.0.tgz",
|
|
45
|
-
"integrity": "sha512-Veu75DEDC7uKsCCsD94UIjFwvHE73+AATBQbBWb83QyJV34wmyxl2Ji+fiiM234mlNn4cpo3DUl0QFrXgRTcfA==",
|
|
46
|
-
"files": [
|
|
47
|
-
{
|
|
48
|
-
"path": "codec/enc/jxl_enc.js",
|
|
49
|
-
"bytes": 47073,
|
|
50
|
-
"gzip": 13132,
|
|
51
|
-
"minified": 24748,
|
|
52
|
-
"minifiedGzip": 8927,
|
|
53
|
-
"sha256": "5bb33d2a204f43035bfca2c581aff28669706aedae93188372c5d5c81532f8a8"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"path": "codec/enc/jxl_enc.wasm",
|
|
57
|
-
"bytes": 1363824,
|
|
58
|
-
"gzip": 516855,
|
|
59
|
-
"minified": 1363824,
|
|
60
|
-
"minifiedGzip": 516855,
|
|
61
|
-
"sha256": "3c6c02df45c0dededab146888789d541b23b9a299cb16d497dce412a3a4bc7d3"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"capability": "jSquash fork; 8-bit lossless/lossy RGBA",
|
|
65
|
-
"encoder": true,
|
|
66
|
-
"source": "git+https://github.com/discourse/jSquash.git",
|
|
67
|
-
"total": {
|
|
68
|
-
"bytes": 1410897,
|
|
69
|
-
"gzip": 529987,
|
|
70
|
-
"minified": 1388572,
|
|
71
|
-
"minifiedGzip": 525782
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"name": "@lacinak/jsquash-jxl",
|
|
76
|
-
"version": "1.3.0-kelaci.0",
|
|
77
|
-
"tarball": "https://registry.npmjs.org/@lacinak/jsquash-jxl/-/jsquash-jxl-1.3.0-kelaci.0.tgz",
|
|
78
|
-
"integrity": "sha512-LZp9O+iYDR2FtSFf4C2p5OQF9NofGOq7/mMUnLbMCMxPHTFLijugUI3iATyRHEwX8v4/br4swDru3TAffcORkw==",
|
|
79
|
-
"files": [
|
|
80
|
-
{
|
|
81
|
-
"path": "codec/enc/jxl_enc.js",
|
|
82
|
-
"bytes": 80759,
|
|
83
|
-
"gzip": 22481,
|
|
84
|
-
"minified": 47676,
|
|
85
|
-
"minifiedGzip": 16519,
|
|
86
|
-
"sha256": "e2d96af9e41f15457ffa6ed05f969774ab184fcbef23efbc20f0f4ad4b789066"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"path": "codec/enc/jxl_enc.wasm",
|
|
90
|
-
"bytes": 2023838,
|
|
91
|
-
"gzip": 828347,
|
|
92
|
-
"minified": 2023838,
|
|
93
|
-
"minifiedGzip": 828347,
|
|
94
|
-
"sha256": "42d1a5516bc238b7864f6919e064b679f89ba647b75d6bc7f0521672bb6d7cdd"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"capability": "jSquash fork with 8/10/12/16/32-bit input options",
|
|
98
|
-
"encoder": true,
|
|
99
|
-
"source": "git+https://github.com/kelaci/jSquash.git",
|
|
100
|
-
"total": {
|
|
101
|
-
"bytes": 2104597,
|
|
102
|
-
"gzip": 850828,
|
|
103
|
-
"minified": 2071514,
|
|
104
|
-
"minifiedGzip": 844866
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"name": "@squoosh-kit/jxl",
|
|
109
|
-
"version": "0.2.10",
|
|
110
|
-
"tarball": "https://registry.npmjs.org/@squoosh-kit/jxl/-/jxl-0.2.10.tgz",
|
|
111
|
-
"integrity": "sha512-yDYw4J0UbZm2+69NSm9IiNnccvUzzThFzlizAQ94vrIUkRfQHFe8l4g1avXui7YFNw80DdAfaZ3q+K026oKRRw==",
|
|
112
|
-
"files": [
|
|
113
|
-
{
|
|
114
|
-
"path": "dist/wasm/jxl-enc/jxl_enc.js",
|
|
115
|
-
"bytes": 50570,
|
|
116
|
-
"gzip": 13769,
|
|
117
|
-
"minified": 26112,
|
|
118
|
-
"minifiedGzip": 9334,
|
|
119
|
-
"sha256": "a0c239eb2d13554b51f5c6eec7c745ef5f76ee104727468278ff26e8bfedd1ca"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"path": "dist/wasm/jxl-enc/jxl_enc.wasm",
|
|
123
|
-
"bytes": 1345677,
|
|
124
|
-
"gzip": 502593,
|
|
125
|
-
"minified": 1345677,
|
|
126
|
-
"minifiedGzip": 502593,
|
|
127
|
-
"sha256": "98113980d99e49bdf5aba4bdc82eb5dd5ce4d3e34a90ac6e9fedcb3a84984223"
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
"capability": "8-bit lossless/lossy RGBA; low-level single-thread factory, kit wrapper excluded",
|
|
131
|
-
"encoder": true,
|
|
132
|
-
"source": "git+https://github.com/bnowak008/squoosh-kit.git",
|
|
133
|
-
"total": {
|
|
134
|
-
"bytes": 1396247,
|
|
135
|
-
"gzip": 516362,
|
|
136
|
-
"minified": 1371789,
|
|
137
|
-
"minifiedGzip": 511927
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"name": "icodec",
|
|
142
|
-
"version": "0.6.0",
|
|
143
|
-
"tarball": "https://registry.npmjs.org/icodec/-/icodec-0.6.0.tgz",
|
|
144
|
-
"integrity": "sha512-m9ptjNaqBTmnTOc7CkNgTXFrAY6QBjiyri6Ba66AGfGN1+OWPBej8cKgeZ+LwKH53zwDu36zukX2PaO8NTUMbw==",
|
|
145
|
-
"files": [
|
|
146
|
-
{
|
|
147
|
-
"path": "dist/jxl-enc.js",
|
|
148
|
-
"bytes": 36177,
|
|
149
|
-
"gzip": 10532,
|
|
150
|
-
"minified": 16747,
|
|
151
|
-
"minifiedGzip": 6920,
|
|
152
|
-
"sha256": "74f5e93abb0b887498c8f561c2d6e9554404d6c4f7040ff97f3ba85cbd42ec1c"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"path": "dist/jxl-enc.wasm",
|
|
156
|
-
"bytes": 2458207,
|
|
157
|
-
"gzip": 894037,
|
|
158
|
-
"minified": 2458207,
|
|
159
|
-
"minifiedGzip": 894037,
|
|
160
|
-
"sha256": "542df53d05fee3cef0696560474e8ceed6168db19bbc4d1154939ef75f72fc0b"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"capability": "8–16-bit lossless/lossy pixels; low-level encoder factory",
|
|
164
|
-
"encoder": true,
|
|
165
|
-
"source": "git+https://github.com/Kaciras/icodec.git",
|
|
166
|
-
"total": {
|
|
167
|
-
"bytes": 2494384,
|
|
168
|
-
"gzip": 904569,
|
|
169
|
-
"minified": 2474954,
|
|
170
|
-
"minifiedGzip": 900957
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "@cornerstonejs/codec-libjxl",
|
|
175
|
-
"version": "1.1.1",
|
|
176
|
-
"tarball": "https://registry.npmjs.org/@cornerstonejs/codec-libjxl/-/codec-libjxl-1.1.1.tgz",
|
|
177
|
-
"integrity": "sha512-Gp5AXNDuqX9CggJ6VJzjEuPowL2IsKGkvUPo3I7ZmCaY1vNDTwOdJUFrHACl3RIMDm+EL9EUw0Lhsmbs5b0fvA==",
|
|
178
|
-
"files": [
|
|
179
|
-
{
|
|
180
|
-
"path": "dist/jpegxlwasm_encode.js",
|
|
181
|
-
"bytes": 50838,
|
|
182
|
-
"gzip": 13491,
|
|
183
|
-
"minified": 24288,
|
|
184
|
-
"minifiedGzip": 8788,
|
|
185
|
-
"sha256": "851bc93debf2e7ff0ecef5a83d4836035c14d43be0d2b88bb64dbec7fcec58c4"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"path": "dist/jpegxlwasm_encode.wasm",
|
|
189
|
-
"bytes": 2550720,
|
|
190
|
-
"gzip": 927454,
|
|
191
|
-
"minified": 2550720,
|
|
192
|
-
"minifiedGzip": 927454,
|
|
193
|
-
"sha256": "6eccfd6d5aa65149e6e8d4802849e0ca64149cbccd76dd31bcfecf836606114b"
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"capability": "1–16-bit grayscale/RGB lossless/lossy; DICOM-oriented API",
|
|
197
|
-
"encoder": true,
|
|
198
|
-
"source": "git+https://github.com/cornerstonejs/codecs.git",
|
|
199
|
-
"total": {
|
|
200
|
-
"bytes": 2601558,
|
|
201
|
-
"gzip": 940945,
|
|
202
|
-
"minified": 2575008,
|
|
203
|
-
"minifiedGzip": 936242
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"name": "jxl-wasm",
|
|
208
|
-
"version": "0.7.0",
|
|
209
|
-
"tarball": "https://registry.npmjs.org/jxl-wasm/-/jxl-wasm-0.7.0.tgz",
|
|
210
|
-
"integrity": "sha512-SQJddwn5YR3fIJnXs9kZQgB7ZtbXzlDOfMdh37zEWGgYooSsXt5fuPRz59AxpozlR1AdScFg4u9+RnH7B/vgSg==",
|
|
211
|
-
"files": [
|
|
212
|
-
{
|
|
213
|
-
"path": "lib/cjxl.js",
|
|
214
|
-
"bytes": 100871,
|
|
215
|
-
"gzip": 26419,
|
|
216
|
-
"minified": 76394,
|
|
217
|
-
"minifiedGzip": 22328,
|
|
218
|
-
"sha256": "6cc9e6bb8c50096972a114776ce1f23f3224129bb792b37480e2bfa0f1308ee2"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"path": "lib/cjxl.wasm",
|
|
222
|
-
"bytes": 2457192,
|
|
223
|
-
"gzip": 939066,
|
|
224
|
-
"minified": 2457192,
|
|
225
|
-
"minifiedGzip": 939066,
|
|
226
|
-
"sha256": "537ee73c2f9a78c42c0828e5792b329533b40806f5aabe6604c057857c9043e4"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"path": "lib/cjxl-wrap.js",
|
|
230
|
-
"bytes": 209,
|
|
231
|
-
"gzip": 164,
|
|
232
|
-
"minified": 172,
|
|
233
|
-
"minifiedGzip": 144,
|
|
234
|
-
"sha256": "fcf7dedb4df50834005036a31e6b0f4812e398c66b04601a4ea582bc1c677389"
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
"capability": "libjxl0.7 command-line interface; pixels and reversible JPEG",
|
|
238
|
-
"encoder": true,
|
|
239
|
-
"source": "git+https://github.com/saschanaz/jxl-wasm.git",
|
|
240
|
-
"total": {
|
|
241
|
-
"bytes": 2558272,
|
|
242
|
-
"gzip": 965649,
|
|
243
|
-
"minified": 2533758,
|
|
244
|
-
"minifiedGzip": 961538
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "jpeg-to-jxl",
|
|
249
|
-
"version": "0.2.0",
|
|
250
|
-
"tarball": "https://registry.npmjs.org/jpeg-to-jxl/-/jpeg-to-jxl-0.2.0.tgz",
|
|
251
|
-
"integrity": "sha512-e3m8iml/FAX3rsH0wXzRnxA6wuPIipRLi2lIucnvRyGSYCx4CVWjUSsK47x9J022uo7q/wRQ/Poa+mBl3rycHg==",
|
|
252
|
-
"files": [
|
|
253
|
-
{
|
|
254
|
-
"path": "dist/index.js",
|
|
255
|
-
"bytes": 5311,
|
|
256
|
-
"gzip": 1818,
|
|
257
|
-
"minified": 1913,
|
|
258
|
-
"minifiedGzip": 775,
|
|
259
|
-
"sha256": "1797f8e7245a6c868677b889075146d82296d8167e12650853e50f9c2d8b081f"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"path": "dist/transcode.js",
|
|
263
|
-
"bytes": 7886,
|
|
264
|
-
"gzip": 3757,
|
|
265
|
-
"minified": 7622,
|
|
266
|
-
"minifiedGzip": 3596,
|
|
267
|
-
"sha256": "7d83a717ab1b7c5625b67536d2019cf01dd70ff76f0f8ab202ff8e1e581479a5"
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"path": "dist/transcode.wasm",
|
|
271
|
-
"bytes": 2723323,
|
|
272
|
-
"gzip": 1059035,
|
|
273
|
-
"minified": 2723323,
|
|
274
|
-
"minifiedGzip": 1059035,
|
|
275
|
-
"sha256": "ebe8e143df765233880a12caa23b4855f807e6cc64b7fb8fae017b370a85aaa6"
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"capability": "JPEG recompression with exact JPEG reconstruction; also includes decode/JPEG fallback",
|
|
279
|
-
"encoder": true,
|
|
280
|
-
"source": "git+https://github.com/ChefJulio/jpeg-to-jxl.git",
|
|
281
|
-
"total": {
|
|
282
|
-
"bytes": 2736520,
|
|
283
|
-
"gzip": 1064610,
|
|
284
|
-
"minified": 2732858,
|
|
285
|
-
"minifiedGzip": 1063406
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"name": "@squoosh/lib",
|
|
290
|
-
"version": "0.5.3",
|
|
291
|
-
"tarball": "https://registry.npmjs.org/@squoosh/lib/-/lib-0.5.3.tgz",
|
|
292
|
-
"integrity": "sha512-d/yn6M0P5rk+L0QOl/hzvlHDqXCCmEvwdcYu7sXwhyYDNskg9oxlZtZTBaKKbX6Vq0rzajI9GZkDC0zXlz/oRw==",
|
|
293
|
-
"files": [
|
|
294
|
-
{
|
|
295
|
-
"path": "build/index.js",
|
|
296
|
-
"bytes": 497408,
|
|
297
|
-
"gzip": 124114,
|
|
298
|
-
"minified": 269919,
|
|
299
|
-
"minifiedGzip": 36617,
|
|
300
|
-
"sha256": "10b2ec36213aac1154a3a1fb7b3840ed30f134a31928123cdeb5c4041824edac"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"path": "build/jxl_node_enc-b8ea914c.wasm",
|
|
304
|
-
"bytes": 1345677,
|
|
305
|
-
"gzip": 502593,
|
|
306
|
-
"minified": 1345677,
|
|
307
|
-
"minifiedGzip": 502593,
|
|
308
|
-
"sha256": "98113980d99e49bdf5aba4bdc82eb5dd5ce4d3e34a90ac6e9fedcb3a84984223"
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
"capability": "8-bit lossless/lossy pixels; shared multi-codec JS and JXL encoder WASM",
|
|
312
|
-
"encoder": true,
|
|
313
|
-
"source": "git+https://github.com/GoogleChromeLabs/squoosh.git",
|
|
314
|
-
"total": {
|
|
315
|
-
"bytes": 1843085,
|
|
316
|
-
"gzip": 626707,
|
|
317
|
-
"minified": 1615596,
|
|
318
|
-
"minifiedGzip": 539210
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"name": "jxl-oxide-wasm",
|
|
323
|
-
"version": "0.12.6",
|
|
324
|
-
"tarball": "https://registry.npmjs.org/jxl-oxide-wasm/-/jxl-oxide-wasm-0.12.6.tgz",
|
|
325
|
-
"integrity": "sha512-nZlPNSJidFAjkTqNcxxqdac/DxY0oNqr/Q98xOb3UutQyvopHjyubnW7KCjvwFuAr3Lew6xRe+7/zZ8tkbFxug==",
|
|
326
|
-
"files": [
|
|
327
|
-
{
|
|
328
|
-
"path": "jxl_oxide_wasm.js",
|
|
329
|
-
"bytes": 19323,
|
|
330
|
-
"gzip": 4050,
|
|
331
|
-
"minified": 9266,
|
|
332
|
-
"minifiedGzip": 2960,
|
|
333
|
-
"sha256": "d9a314abc55d167e94e2d995ce6ab5276f86ef9de41f06df11fef3acf55ff6b7"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"path": "jxl_oxide_wasm_bg.wasm",
|
|
337
|
-
"bytes": 1698491,
|
|
338
|
-
"gzip": 609588,
|
|
339
|
-
"minified": 1698491,
|
|
340
|
-
"minifiedGzip": 609588,
|
|
341
|
-
"sha256": "3336f3abd4a04fccc437e7a84f12d4b63c12f302044110867f99be14c4c75a69"
|
|
342
|
-
}
|
|
343
|
-
],
|
|
344
|
-
"capability": "Decoder only; excluded from encoder ranking",
|
|
345
|
-
"encoder": false,
|
|
346
|
-
"source": "git+https://github.com/tirr-c/jxl-oxide.git",
|
|
347
|
-
"total": {
|
|
348
|
-
"bytes": 1717814,
|
|
349
|
-
"gzip": 613638,
|
|
350
|
-
"minified": 1707757,
|
|
351
|
-
"minifiedGzip": 612548
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
]
|
|
355
|
-
}
|
package/public/encoders.json
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"asOf": "2026-09-30",
|
|
3
|
-
"terser": "5.51.2",
|
|
4
|
-
"scope": "Published executable JavaScript/WebAssembly encoder payloads found through npm jpeg-xl/jpegxl/jxl searches and upstream repositories; single-thread variants. Decoder-only packages are identified, not ranked. No claim of an exhaustive internet census or the minimum possible build.",
|
|
5
|
-
"entries": [
|
|
6
|
-
{
|
|
7
|
-
"name": "@jsquash/jxl",
|
|
8
|
-
"version": "1.3.0",
|
|
9
|
-
"tarball": "https://registry.npmjs.org/@jsquash/jxl/-/jxl-1.3.0.tgz",
|
|
10
|
-
"integrity": "sha512-IVOPTneyOd9eBAuow+FnCYIP6wkIc7CjrCDnZGiqAPyJ63vMVxv3zoWiucGiZVh6u9vi/l40AkcS9QwkoVSAqA==",
|
|
11
|
-
"files": [
|
|
12
|
-
"codec/enc/jxl_enc.js",
|
|
13
|
-
"codec/enc/jxl_enc.wasm"
|
|
14
|
-
],
|
|
15
|
-
"capability": "8-bit lossless/lossy RGBA; single-thread encoder factory",
|
|
16
|
-
"encoder": true,
|
|
17
|
-
"source": "git+https://github.com/jamsinclair/jSquash.git"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"name": "@discourse/jxl",
|
|
21
|
-
"version": "1.3.0",
|
|
22
|
-
"tarball": "https://registry.npmjs.org/@discourse/jxl/-/jxl-1.3.0.tgz",
|
|
23
|
-
"integrity": "sha512-Veu75DEDC7uKsCCsD94UIjFwvHE73+AATBQbBWb83QyJV34wmyxl2Ji+fiiM234mlNn4cpo3DUl0QFrXgRTcfA==",
|
|
24
|
-
"files": [
|
|
25
|
-
"codec/enc/jxl_enc.js",
|
|
26
|
-
"codec/enc/jxl_enc.wasm"
|
|
27
|
-
],
|
|
28
|
-
"capability": "jSquash fork; 8-bit lossless/lossy RGBA",
|
|
29
|
-
"encoder": true,
|
|
30
|
-
"source": "git+https://github.com/discourse/jSquash.git"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "@lacinak/jsquash-jxl",
|
|
34
|
-
"version": "1.3.0-kelaci.0",
|
|
35
|
-
"tarball": "https://registry.npmjs.org/@lacinak/jsquash-jxl/-/jsquash-jxl-1.3.0-kelaci.0.tgz",
|
|
36
|
-
"integrity": "sha512-LZp9O+iYDR2FtSFf4C2p5OQF9NofGOq7/mMUnLbMCMxPHTFLijugUI3iATyRHEwX8v4/br4swDru3TAffcORkw==",
|
|
37
|
-
"files": [
|
|
38
|
-
"codec/enc/jxl_enc.js",
|
|
39
|
-
"codec/enc/jxl_enc.wasm"
|
|
40
|
-
],
|
|
41
|
-
"capability": "jSquash fork with 8/10/12/16/32-bit input options",
|
|
42
|
-
"encoder": true,
|
|
43
|
-
"source": "git+https://github.com/kelaci/jSquash.git"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "@squoosh-kit/jxl",
|
|
47
|
-
"version": "0.2.10",
|
|
48
|
-
"tarball": "https://registry.npmjs.org/@squoosh-kit/jxl/-/jxl-0.2.10.tgz",
|
|
49
|
-
"integrity": "sha512-yDYw4J0UbZm2+69NSm9IiNnccvUzzThFzlizAQ94vrIUkRfQHFe8l4g1avXui7YFNw80DdAfaZ3q+K026oKRRw==",
|
|
50
|
-
"files": [
|
|
51
|
-
"dist/wasm/jxl-enc/jxl_enc.js",
|
|
52
|
-
"dist/wasm/jxl-enc/jxl_enc.wasm"
|
|
53
|
-
],
|
|
54
|
-
"capability": "8-bit lossless/lossy RGBA; low-level single-thread factory, kit wrapper excluded",
|
|
55
|
-
"encoder": true,
|
|
56
|
-
"source": "git+https://github.com/bnowak008/squoosh-kit.git"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "icodec",
|
|
60
|
-
"version": "0.6.0",
|
|
61
|
-
"tarball": "https://registry.npmjs.org/icodec/-/icodec-0.6.0.tgz",
|
|
62
|
-
"integrity": "sha512-m9ptjNaqBTmnTOc7CkNgTXFrAY6QBjiyri6Ba66AGfGN1+OWPBej8cKgeZ+LwKH53zwDu36zukX2PaO8NTUMbw==",
|
|
63
|
-
"files": [
|
|
64
|
-
"dist/jxl-enc.js",
|
|
65
|
-
"dist/jxl-enc.wasm"
|
|
66
|
-
],
|
|
67
|
-
"capability": "8\u201316-bit lossless/lossy pixels; low-level encoder factory",
|
|
68
|
-
"encoder": true,
|
|
69
|
-
"source": "git+https://github.com/Kaciras/icodec.git"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": "@cornerstonejs/codec-libjxl",
|
|
73
|
-
"version": "1.1.1",
|
|
74
|
-
"tarball": "https://registry.npmjs.org/@cornerstonejs/codec-libjxl/-/codec-libjxl-1.1.1.tgz",
|
|
75
|
-
"integrity": "sha512-Gp5AXNDuqX9CggJ6VJzjEuPowL2IsKGkvUPo3I7ZmCaY1vNDTwOdJUFrHACl3RIMDm+EL9EUw0Lhsmbs5b0fvA==",
|
|
76
|
-
"files": [
|
|
77
|
-
"dist/jpegxlwasm_encode.js",
|
|
78
|
-
"dist/jpegxlwasm_encode.wasm"
|
|
79
|
-
],
|
|
80
|
-
"capability": "1\u201316-bit grayscale/RGB lossless/lossy; DICOM-oriented API",
|
|
81
|
-
"encoder": true,
|
|
82
|
-
"source": "git+https://github.com/cornerstonejs/codecs.git"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "jxl-wasm",
|
|
86
|
-
"version": "0.7.0",
|
|
87
|
-
"tarball": "https://registry.npmjs.org/jxl-wasm/-/jxl-wasm-0.7.0.tgz",
|
|
88
|
-
"integrity": "sha512-SQJddwn5YR3fIJnXs9kZQgB7ZtbXzlDOfMdh37zEWGgYooSsXt5fuPRz59AxpozlR1AdScFg4u9+RnH7B/vgSg==",
|
|
89
|
-
"files": [
|
|
90
|
-
"lib/cjxl.js",
|
|
91
|
-
"lib/cjxl.wasm",
|
|
92
|
-
"lib/cjxl-wrap.js"
|
|
93
|
-
],
|
|
94
|
-
"capability": "libjxl0.7 command-line interface; pixels and reversible JPEG",
|
|
95
|
-
"encoder": true,
|
|
96
|
-
"source": "git+https://github.com/saschanaz/jxl-wasm.git"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "jpeg-to-jxl",
|
|
100
|
-
"version": "0.2.0",
|
|
101
|
-
"tarball": "https://registry.npmjs.org/jpeg-to-jxl/-/jpeg-to-jxl-0.2.0.tgz",
|
|
102
|
-
"integrity": "sha512-e3m8iml/FAX3rsH0wXzRnxA6wuPIipRLi2lIucnvRyGSYCx4CVWjUSsK47x9J022uo7q/wRQ/Poa+mBl3rycHg==",
|
|
103
|
-
"files": [
|
|
104
|
-
"dist/index.js",
|
|
105
|
-
"dist/transcode.js",
|
|
106
|
-
"dist/transcode.wasm"
|
|
107
|
-
],
|
|
108
|
-
"capability": "JPEG recompression with exact JPEG reconstruction; also includes decode/JPEG fallback",
|
|
109
|
-
"encoder": true,
|
|
110
|
-
"source": "git+https://github.com/ChefJulio/jpeg-to-jxl.git"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "@squoosh/lib",
|
|
114
|
-
"version": "0.5.3",
|
|
115
|
-
"tarball": "https://registry.npmjs.org/@squoosh/lib/-/lib-0.5.3.tgz",
|
|
116
|
-
"integrity": "sha512-d/yn6M0P5rk+L0QOl/hzvlHDqXCCmEvwdcYu7sXwhyYDNskg9oxlZtZTBaKKbX6Vq0rzajI9GZkDC0zXlz/oRw==",
|
|
117
|
-
"files": [
|
|
118
|
-
"build/index.js",
|
|
119
|
-
"build/jxl_node_enc-b8ea914c.wasm"
|
|
120
|
-
],
|
|
121
|
-
"capability": "8-bit lossless/lossy pixels; shared multi-codec JS and JXL encoder WASM",
|
|
122
|
-
"encoder": true,
|
|
123
|
-
"source": "git+https://github.com/GoogleChromeLabs/squoosh.git"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"name": "jxl-oxide-wasm",
|
|
127
|
-
"version": "0.12.6",
|
|
128
|
-
"tarball": "https://registry.npmjs.org/jxl-oxide-wasm/-/jxl-oxide-wasm-0.12.6.tgz",
|
|
129
|
-
"integrity": "sha512-nZlPNSJidFAjkTqNcxxqdac/DxY0oNqr/Q98xOb3UutQyvopHjyubnW7KCjvwFuAr3Lew6xRe+7/zZ8tkbFxug==",
|
|
130
|
-
"files": [
|
|
131
|
-
"jxl_oxide_wasm.js",
|
|
132
|
-
"jxl_oxide_wasm_bg.wasm"
|
|
133
|
-
],
|
|
134
|
-
"capability": "Decoder only; excluded from encoder ranking",
|
|
135
|
-
"encoder": false,
|
|
136
|
-
"source": "git+https://github.com/tirr-c/jxl-oxide.git"
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<meta charset="utf-8">
|
|
3
|
-
<title>Rapier JXL in a page</title>
|
|
4
|
-
<style>body{font:16px/1.5 system-ui;max-width:48em;margin:2em auto;padding:0 1em}img{max-width:100%;display:block;margin:1em 0}code{font-size:.9em}</style>
|
|
5
|
-
<h1>Rapier JXL</h1>
|
|
6
|
-
<p>Choose a picture. A JPEG is carried whole; anything else is drawn on a canvas and encoded from its pixels.
|
|
7
|
-
The result shows only in a browser that decodes JPEG XL; the size is reported either way.</p>
|
|
8
|
-
<p><input type="file" accept="image/*"> <label><input type="checkbox" id="lossy"> lossy, quality <input id="q" type="number" min="1" max="99" value="80" size="3"></label></p>
|
|
9
|
-
<p id="out"></p>
|
|
10
|
-
<img id="shown" alt="">
|
|
11
|
-
<script type="module">
|
|
12
|
-
import {encode} from '../../index.mjs';
|
|
13
|
-
import {transcode} from '../../jpeg.mjs';
|
|
14
|
-
import {encodePhoto} from '../../photo.mjs';
|
|
15
|
-
const out = document.getElementById('out'), shown = document.getElementById('shown');
|
|
16
|
-
document.querySelector('input[type=file]').addEventListener('change', async event => {
|
|
17
|
-
const file = event.target.files[0];
|
|
18
|
-
if (!file) return;
|
|
19
|
-
const started = performance.now();
|
|
20
|
-
let bytes, note;
|
|
21
|
-
try {
|
|
22
|
-
if (file.type === 'image/jpeg') {
|
|
23
|
-
const jpeg = new Uint8Array(await file.arrayBuffer());
|
|
24
|
-
try { ({bytes} = transcode(jpeg)); note = 'carried whole'; }
|
|
25
|
-
catch (error) { if (error.code !== 'JXL_JPEG') throw error; }
|
|
26
|
-
}
|
|
27
|
-
if (!bytes) {
|
|
28
|
-
const image = await createImageBitmap(file), canvas = new OffscreenCanvas(image.width, image.height), context = canvas.getContext('2d');
|
|
29
|
-
context.drawImage(image, 0, 0);
|
|
30
|
-
const {data, width, height} = context.getImageData(0, 0, image.width, image.height);
|
|
31
|
-
const quality = document.getElementById('lossy').checked ? Number(document.getElementById('q').value) : 100;
|
|
32
|
-
bytes = quality >= 100 ? encode(data, width, height) : encodePhoto(data, width, height, {quality}); note = quality >= 100 ? 'lossless' : 'lossy, quality ' + quality;
|
|
33
|
-
}
|
|
34
|
-
const ms = Math.round(performance.now() - started);
|
|
35
|
-
out.textContent = `${file.name}: ${file.size.toLocaleString()} bytes in, ${bytes.length.toLocaleString()} bytes of JPEG XL out (${note}, ${ms} ms).`;
|
|
36
|
-
shown.src = URL.createObjectURL(new Blob([bytes], {type: 'image/jxl'}));
|
|
37
|
-
} catch (error) { out.textContent = (error.code || 'error') + ': ' + error.message; }
|
|
38
|
-
});
|
|
39
|
-
</script>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// A complete worker around Rapier JXL: post {id, op: 'encode' or 'photo', data, width, height, quality} or
|
|
3
|
-
// {id, op: 'transcode', jpeg}; receive {id, progress} while it works, then {id, ok: true, bytes, width, height,
|
|
4
|
-
// orientation} or {id, ok: false, code, message}. {id, op: 'abort'} ends a request between steps. 'encode' takes an
|
|
5
|
-
// effort (the effort door; 1, its default, writes the core's bytes) and a deadline in milliseconds: past it the search
|
|
6
|
-
// is hurried and answers with the smallest stream written so far, never larger than effort 1's. Bytes are transferred.
|
|
7
|
-
import {encodeSteps} from '../../effort.mjs';
|
|
8
|
-
import {transcodeSteps} from '../../jpeg.mjs';
|
|
9
|
-
import {encodePhotoSteps} from '../../photo.mjs';
|
|
10
|
-
|
|
11
|
-
const running = new Set();
|
|
12
|
-
const turn = () => new Promise(resolve => setTimeout(resolve));
|
|
13
|
-
|
|
14
|
-
self.onmessage = async event => {
|
|
15
|
-
const ask = event.data || {}, {id, op} = ask;
|
|
16
|
-
if (op === 'abort') { running.delete(id); return; }
|
|
17
|
-
try {
|
|
18
|
-
const job = op === 'encode' ? encodeSteps(ask.data, ask.width, ask.height, {quality: ask.quality, effort: ask.effort})
|
|
19
|
-
: op === 'photo' ? encodePhotoSteps(ask.data, ask.width, ask.height, {quality: ask.quality})
|
|
20
|
-
: op === 'transcode' ? transcodeSteps(ask.jpeg)
|
|
21
|
-
: null;
|
|
22
|
-
if (!job) throw Object.assign(new Error('unknown op ' + op), {code: 'JXL_INPUT'});
|
|
23
|
-
running.add(id);
|
|
24
|
-
let shown = performance.now();
|
|
25
|
-
const hurryAt = ask.deadline >= 0 ? shown + ask.deadline : Infinity;
|
|
26
|
-
for (const done of job) {
|
|
27
|
-
if (performance.now() >= hurryAt) job.hurry = true;
|
|
28
|
-
// Every 50 ms the worker takes its messages (an abort among them) and reports progress; leaving is the cancel.
|
|
29
|
-
if (performance.now() - shown < 50) continue;
|
|
30
|
-
self.postMessage({id, progress: done});
|
|
31
|
-
await turn();
|
|
32
|
-
if (!running.has(id)) return;
|
|
33
|
-
shown = performance.now();
|
|
34
|
-
}
|
|
35
|
-
running.delete(id);
|
|
36
|
-
const out = {bytes: job.bytes, width: job.width ?? ask.width, height: job.height ?? ask.height, orientation: job.orientation ?? 1};
|
|
37
|
-
self.postMessage({id, ok: true, ...out}, [out.bytes.buffer]);
|
|
38
|
-
} catch (error) {
|
|
39
|
-
running.delete(id);
|
|
40
|
-
self.postMessage({id, ok: false, code: error.code || 'JXL_ERROR', message: String(error.message || error)});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Measure pinned published bytes; never install or execute a downloaded package.
|
|
3
|
-
// npm install --no-save terser@5.51.2
|
|
4
|
-
// node public/measure-encoders.mjs [cache-directory] [output.json]
|
|
5
|
-
import {readFile, writeFile, mkdir} from 'node:fs/promises';
|
|
6
|
-
import {createHash} from 'node:crypto';
|
|
7
|
-
import {gzipSync, gunzipSync} from 'node:zlib';
|
|
8
|
-
import {createRequire} from 'node:module';
|
|
9
|
-
import {resolve, join, dirname} from 'node:path';
|
|
10
|
-
const require = createRequire(import.meta.url);
|
|
11
|
-
const {minify} = require(process.env.RAPIER_TERSER || 'terser');
|
|
12
|
-
const manifest = JSON.parse(await readFile(new URL('./encoders.json', import.meta.url), 'utf8'));
|
|
13
|
-
const terserVersion = require(process.env.RAPIER_TERSER ? join(dirname(process.env.RAPIER_TERSER), 'package.json') : 'terser/package.json').version;
|
|
14
|
-
if (terserVersion !== manifest.terser) throw Error('Use terser@' + manifest.terser + ', received ' + terserVersion);
|
|
15
|
-
const cache = resolve(process.argv[2] || '.encoder-size-cache');
|
|
16
|
-
await mkdir(cache, {recursive: true});
|
|
17
|
-
const sha256 = b => createHash('sha256').update(b).digest('hex');
|
|
18
|
-
const gzip = b => gzipSync(b, {level: 9}).length;
|
|
19
|
-
function member(archive, name) {
|
|
20
|
-
for (let at = 0; at + 512 <= archive.length;) {
|
|
21
|
-
const header = archive.subarray(at, at + 512);
|
|
22
|
-
const string = (from, length) => header.subarray(from, from + length).toString('utf8').replace(/\0.*$/, '');
|
|
23
|
-
const path = [string(345, 155), string(0, 100)].filter(Boolean).join('/');
|
|
24
|
-
const size = parseInt(string(124, 12).trim() || '0', 8);
|
|
25
|
-
if (!Number.isSafeInteger(size) || size < 0 || at + 512 + size > archive.length) throw Error('Invalid archive');
|
|
26
|
-
if (path === 'package/' + name) return archive.subarray(at + 512, at + 512 + size);
|
|
27
|
-
at += 512 + Math.ceil(size / 512) * 512;
|
|
28
|
-
}
|
|
29
|
-
throw Error('Archive does not contain ' + name);
|
|
30
|
-
}
|
|
31
|
-
const entries = [];
|
|
32
|
-
for (const entry of manifest.entries) {
|
|
33
|
-
const filename = join(cache, entry.name.replaceAll('/', '-') + '-' + entry.version + '.tgz');
|
|
34
|
-
let bytes = await readFile(filename).catch(() => null);
|
|
35
|
-
if (!bytes) {
|
|
36
|
-
const response = await fetch(entry.tarball);
|
|
37
|
-
if (!response.ok) throw Error(entry.tarball + ': HTTP ' + response.status);
|
|
38
|
-
bytes = Buffer.from(await response.arrayBuffer());
|
|
39
|
-
}
|
|
40
|
-
const [algorithm, wanted] = entry.integrity.split('-');
|
|
41
|
-
if (createHash(algorithm).update(bytes).digest('base64') !== wanted) throw Error('Package integrity mismatch: ' + entry.name);
|
|
42
|
-
await writeFile(filename, bytes);
|
|
43
|
-
const archive = gunzipSync(bytes), files = [];
|
|
44
|
-
for (const path of entry.files) {
|
|
45
|
-
const raw = member(archive, path);
|
|
46
|
-
let min = raw;
|
|
47
|
-
if (/\.[cm]?js$/.test(path)) {
|
|
48
|
-
const result = await minify(raw.toString('utf8'), {module: /\bexport\s/.test(raw.toString('utf8')), compress: {passes: 2}, mangle: true, format: {comments: 'some'}});
|
|
49
|
-
if (!result.code) throw Error('Empty JavaScript after minification: ' + path);
|
|
50
|
-
min = Buffer.from(result.code + '\n');
|
|
51
|
-
}
|
|
52
|
-
files.push({path, bytes: raw.length, gzip: gzip(raw), minified: min.length, minifiedGzip: gzip(min), sha256: sha256(raw)});
|
|
53
|
-
}
|
|
54
|
-
const total = key => files.reduce((sum, f) => sum + f[key], 0);
|
|
55
|
-
entries.push({...entry, files, total: {bytes: total('bytes'), gzip: total('gzip'), minified: total('minified'), minifiedGzip: total('minifiedGzip')}});
|
|
56
|
-
}
|
|
57
|
-
const receipt = {asOf: manifest.asOf, node: process.version, terser: manifest.terser, scope: manifest.scope,
|
|
58
|
-
method: 'Sum of listed JavaScript and WASM resources. Terser compress passes=2, mangle=true, preserved license comments; WASM unchanged. gzip level9 per resource, summed, not npm archive size. No tree-shaking across resources, WASM optimization or invented rebuild. Factory-only entries omit optional convenience wrappers, workers, threaded variants and decoders; that favors competitors. Capability is documented upstream, not a conformance result from this size survey.', entries};
|
|
59
|
-
await writeFile(resolve(process.argv[3] || 'encoder-sizes.json'), JSON.stringify(receipt, null, 2) + '\n');
|
|
60
|
-
for (const r of entries) console.log(r.name + '@' + r.version + '\t' + r.total.minified + '\t' + r.total.minifiedGzip + '\t' + r.capability);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{ans.mjs → src/ans.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|