@php-wasm/stream-compression 1.0.28 → 1.1.0

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/index.js CHANGED
@@ -1,77 +1,77 @@
1
1
  import "@php-wasm/node-polyfills";
2
2
  import { Semaphore as B } from "@php-wasm/util";
3
3
  function U(...e) {
4
- const n = new Uint8Array(
5
- e.reduce((r, a) => r + a.length, 0)
4
+ const r = new Uint8Array(
5
+ e.reduce((n, a) => n + a.length, 0)
6
6
  );
7
7
  let t = 0;
8
- for (const r of e)
9
- n.set(r, t), t += r.length;
10
- return n;
8
+ for (const n of e)
9
+ r.set(n, t), t += n.length;
10
+ return r;
11
11
  }
12
12
  function S(e) {
13
13
  if (e === void 0) {
14
- let n = new Uint8Array();
14
+ let r = new Uint8Array();
15
15
  return new TransformStream({
16
16
  transform(t) {
17
- n = U(n, t);
17
+ r = U(r, t);
18
18
  },
19
19
  flush(t) {
20
- t.enqueue(n);
20
+ t.enqueue(r);
21
21
  }
22
22
  });
23
23
  } else {
24
- const n = new ArrayBuffer(e || 0);
24
+ const r = new ArrayBuffer(e || 0);
25
25
  let t = 0;
26
26
  return new TransformStream({
27
- transform(r) {
28
- new Uint8Array(n).set(r, t), t += r.byteLength;
27
+ transform(n) {
28
+ new Uint8Array(r).set(n, t), t += n.byteLength;
29
29
  },
30
- flush(r) {
31
- r.enqueue(new Uint8Array(n));
30
+ flush(n) {
31
+ n.enqueue(new Uint8Array(r));
32
32
  }
33
33
  });
34
34
  }
35
35
  }
36
- function A(e, n) {
37
- if (n === 0)
36
+ function A(e, r) {
37
+ if (r === 0)
38
38
  return new ReadableStream({
39
39
  start(a) {
40
40
  a.close();
41
41
  }
42
42
  });
43
43
  const t = e.getReader({ mode: "byob" });
44
- let r = 0;
44
+ let n = 0;
45
45
  return new ReadableStream({
46
46
  async pull(a) {
47
47
  const { value: i, done: s } = await t.read(
48
- new Uint8Array(n - r)
48
+ new Uint8Array(r - n)
49
49
  );
50
50
  if (s) {
51
51
  t.releaseLock(), a.close();
52
52
  return;
53
53
  }
54
- r += i.length, a.enqueue(i), r >= n && (t.releaseLock(), a.close());
54
+ n += i.length, a.enqueue(i), n >= r && (t.releaseLock(), a.close());
55
55
  },
56
56
  cancel() {
57
57
  t.cancel();
58
58
  }
59
59
  });
60
60
  }
61
- async function c(e, n) {
62
- return n !== void 0 && (e = A(e, n)), await e.pipeThrough(S(n)).getReader().read().then(({ value: t }) => t);
61
+ async function c(e, r) {
62
+ return r !== void 0 && (e = A(e, r)), await e.pipeThrough(S(r)).getReader().read().then(({ value: t }) => t);
63
63
  }
64
- async function re(e, n) {
65
- return new File([await c(n)], e);
64
+ async function re(e, r) {
65
+ return new File([await c(r)], e);
66
66
  }
67
67
  function _(e) {
68
68
  if (e instanceof ReadableStream)
69
69
  return e;
70
- let n;
71
- return Symbol.asyncIterator in e ? n = e[Symbol.asyncIterator]() : Symbol.iterator in e ? n = e[Symbol.iterator]() : n = e, new ReadableStream({
70
+ let r;
71
+ return Symbol.asyncIterator in e ? r = e[Symbol.asyncIterator]() : Symbol.iterator in e ? r = e[Symbol.iterator]() : r = e, new ReadableStream({
72
72
  async pull(t) {
73
- const { done: r, value: a } = await n.next();
74
- if (r) {
73
+ const { done: n, value: a } = await r.next();
74
+ if (n) {
75
75
  t.close();
76
76
  return;
77
77
  }
@@ -85,10 +85,10 @@ class ae extends File {
85
85
  *
86
86
  * @param readableStream The readable stream containing the file data.
87
87
  * @param name The name of the file.
88
- * @param type The MIME type of the file.
88
+ * @param options An object containing options such as the MIME type and file size.
89
89
  */
90
- constructor(n, t, r) {
91
- super([], t, { type: r }), this.readableStream = n;
90
+ constructor(r, t, n) {
91
+ super([], t, { type: n == null ? void 0 : n.type }), this.readableStream = r, this.filesize = n == null ? void 0 : n.filesize;
92
92
  }
93
93
  /**
94
94
  * Overrides the slice() method of the File class.
@@ -127,8 +127,8 @@ ReadableStream.prototype[Symbol.asyncIterator] || (ReadableStream.prototype[Symb
127
127
  const e = this.getReader();
128
128
  try {
129
129
  for (; ; ) {
130
- const { done: n, value: t } = await e.read();
131
- if (n)
130
+ const { done: r, value: t } = await e.read();
131
+ if (r)
132
132
  return;
133
133
  yield t;
134
134
  }
@@ -140,33 +140,33 @@ ReadableStream.prototype[Symbol.asyncIterator]);
140
140
  const F = 32, h = 67324752, w = 33639248, g = 101010256, N = 0, E = 8;
141
141
  function b(e) {
142
142
  return new TransformStream({
143
- transform(n, t) {
144
- e(n) && t.enqueue(n);
143
+ transform(r, t) {
144
+ e(r) && t.enqueue(r);
145
145
  }
146
146
  });
147
147
  }
148
148
  function q(e) {
149
- let n = !1;
149
+ let r = !1;
150
150
  return new TransformStream({
151
- async transform(t, r) {
152
- n || (n = !0, r.enqueue(e)), r.enqueue(t);
151
+ async transform(t, n) {
152
+ r || (r = !0, n.enqueue(e)), n.enqueue(t);
153
153
  }
154
154
  });
155
155
  }
156
156
  function x(e) {
157
157
  return new TransformStream({
158
- async transform(n, t) {
159
- t.enqueue(n);
158
+ async transform(r, t) {
159
+ t.enqueue(r);
160
160
  },
161
- async flush(n) {
162
- n.enqueue(e);
161
+ async flush(r) {
162
+ r.enqueue(e);
163
163
  }
164
164
  });
165
165
  }
166
- function p(e, n) {
167
- return M(e, n).pipeThrough(
166
+ function p(e, r) {
167
+ return M(e, r).pipeThrough(
168
168
  new TransformStream({
169
- async transform(t, r) {
169
+ async transform(t, n) {
170
170
  const a = new File(
171
171
  [t.bytes],
172
172
  new TextDecoder().decode(t.path),
@@ -174,36 +174,36 @@ function p(e, n) {
174
174
  type: t.isDirectory ? "directory" : void 0
175
175
  }
176
176
  );
177
- r.enqueue(a);
177
+ n.enqueue(a);
178
178
  }
179
179
  })
180
180
  );
181
181
  }
182
182
  const k = () => !0;
183
- function M(e, n = k) {
183
+ function M(e, r = k) {
184
184
  return new ReadableStream({
185
- async pull(r) {
185
+ async pull(n) {
186
186
  const a = await v(e);
187
187
  if (!a) {
188
- r.close();
188
+ n.close();
189
189
  return;
190
190
  }
191
- r.enqueue(a);
191
+ n.enqueue(a);
192
192
  }
193
193
  }).pipeThrough(
194
- b(({ signature: r }) => r === h)
194
+ b(({ signature: n }) => n === h)
195
195
  ).pipeThrough(
196
- b(n)
196
+ b(r)
197
197
  );
198
198
  }
199
199
  async function v(e) {
200
200
  const t = new DataView((await c(e, 4)).buffer).getUint32(0, !0);
201
201
  return t === h ? await L(e, !0) : t === w ? await T(e, !0) : t === g ? await O(e, !0) : null;
202
202
  }
203
- async function L(e, n = !1) {
204
- if (!n && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== h)
203
+ async function L(e, r = !1) {
204
+ if (!r && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== h)
205
205
  return null;
206
- const t = new DataView((await c(e, 26)).buffer), r = t.getUint16(22, !0), a = t.getUint16(24, !0), i = {
206
+ const t = new DataView((await c(e, 26)).buffer), n = t.getUint16(22, !0), a = t.getUint16(24, !0), i = {
207
207
  signature: h,
208
208
  version: t.getUint32(0, !0),
209
209
  generalPurpose: t.getUint16(2, !0),
@@ -214,7 +214,7 @@ async function L(e, n = !1) {
214
214
  compressedSize: t.getUint32(14, !0),
215
215
  uncompressedSize: t.getUint32(18, !0)
216
216
  };
217
- i.path = await c(e, r), i.isDirectory = R(i.path), i.extra = await c(e, a);
217
+ i.path = await c(e, n), i.isDirectory = R(i.path), i.extra = await c(e, a);
218
218
  let s = A(e, i.compressedSize);
219
219
  if (i.compressionMethod === E) {
220
220
  const o = new Uint8Array(10);
@@ -224,10 +224,10 @@ async function L(e, n = !1) {
224
224
  }
225
225
  return i.bytes = await s.pipeThrough(S(i.uncompressedSize)).getReader().read().then(({ value: o }) => o), i;
226
226
  }
227
- async function T(e, n = !1) {
228
- if (!n && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== w)
227
+ async function T(e, r = !1) {
228
+ if (!r && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== w)
229
229
  return null;
230
- const t = new DataView((await c(e, 42)).buffer), r = t.getUint16(24, !0), a = t.getUint16(26, !0), i = t.getUint16(28, !0), s = {
230
+ const t = new DataView((await c(e, 42)).buffer), n = t.getUint16(24, !0), a = t.getUint16(26, !0), i = t.getUint16(28, !0), s = {
231
231
  signature: w,
232
232
  versionCreated: t.getUint16(0, !0),
233
233
  versionNeeded: t.getUint16(2, !0),
@@ -243,18 +243,18 @@ async function T(e, n = !1) {
243
243
  externalAttributes: t.getUint32(34, !0),
244
244
  firstByteAt: t.getUint32(38, !0)
245
245
  };
246
- return s.lastByteAt = s.firstByteAt + F + r + i + a + s.compressedSize - 1, s.path = await c(e, r), s.isDirectory = R(s.path), s.extra = await c(e, a), s.fileComment = await c(
246
+ return s.lastByteAt = s.firstByteAt + F + n + i + a + s.compressedSize - 1, s.path = await c(e, n), s.isDirectory = R(s.path), s.extra = await c(e, a), s.fileComment = await c(
247
247
  e,
248
248
  i
249
249
  ), s;
250
250
  }
251
251
  function R(e) {
252
- return e[e.byteLength - 1] == "/".charCodeAt(0);
252
+ return e[e.byteLength - 1] == 47;
253
253
  }
254
- async function O(e, n = !1) {
255
- if (!n && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== g)
254
+ async function O(e, r = !1) {
255
+ if (!r && new DataView((await c(e, 4)).buffer).getUint32(0, !0) !== g)
256
256
  return null;
257
- const t = new DataView((await c(e, 18)).buffer), r = {
257
+ const t = new DataView((await c(e, 18)).buffer), n = {
258
258
  signature: g,
259
259
  numberOfDisks: t.getUint16(0, !0),
260
260
  centralDirectoryStartDisk: t.getUint16(2, !0),
@@ -263,11 +263,11 @@ async function O(e, n = !1) {
263
263
  centralDirectorySize: t.getUint32(8, !0),
264
264
  centralDirectoryOffset: t.getUint32(12, !0)
265
265
  }, a = t.getUint16(16, !0);
266
- return r.comment = await c(e, a), r;
266
+ return n.comment = await c(e, a), n;
267
267
  }
268
268
  const P = 110 * 1024, I = 10 * 1024, z = 1024 * 1024 * 1, V = new B({ concurrency: 10 }), D = () => !0;
269
- async function ie(e, n = D) {
270
- if (n === D) {
269
+ async function ie(e, r = D) {
270
+ if (r === D) {
271
271
  const d = await fetch(e);
272
272
  return p(d.body);
273
273
  }
@@ -276,7 +276,7 @@ async function ie(e, n = D) {
276
276
  const d = await fetch(e);
277
277
  return p(d.body);
278
278
  }
279
- const r = await fetch(e, {
279
+ const n = await fetch(e, {
280
280
  headers: {
281
281
  // 0-0 looks weird, doesn't it?
282
282
  // The Range header is inclusive so it's actually
@@ -284,43 +284,43 @@ async function ie(e, n = D) {
284
284
  Range: "bytes=0-0",
285
285
  "Accept-Encoding": "none"
286
286
  }
287
- }), [a, i] = r.body.tee(), s = a.getReader(), { value: o } = await s.read(), { done: f } = await s.read();
287
+ }), [a, i] = n.body.tee(), s = a.getReader(), { value: o } = await s.read(), { done: f } = await s.read();
288
288
  if (s.releaseLock(), a.cancel(), !((o == null ? void 0 : o.length) === 1 && f))
289
289
  return p(i);
290
290
  i.cancel();
291
291
  const l = await $(e, t);
292
- return H(l).pipeThrough(b(n)).pipeThrough(G()).pipeThrough(
292
+ return H(l).pipeThrough(b(r)).pipeThrough(G()).pipeThrough(
293
293
  W(l)
294
294
  );
295
295
  }
296
296
  function H(e) {
297
- let n;
297
+ let r;
298
298
  return new ReadableStream({
299
299
  async start() {
300
- n = await Z(e);
300
+ r = await Z(e);
301
301
  },
302
302
  async pull(t) {
303
- const r = await T(
304
- n
303
+ const n = await T(
304
+ r
305
305
  );
306
- if (!r) {
306
+ if (!n) {
307
307
  t.close();
308
308
  return;
309
309
  }
310
- t.enqueue(r);
310
+ t.enqueue(n);
311
311
  }
312
312
  });
313
313
  }
314
314
  async function Z(e) {
315
- const n = P;
316
- let t = new Uint8Array(), r = e.length;
315
+ const r = P;
316
+ let t = new Uint8Array(), n = e.length;
317
317
  do {
318
- r = Math.max(0, r - n);
318
+ n = Math.max(0, n - r);
319
319
  const a = Math.min(
320
- r + n - 1,
320
+ n + r - 1,
321
321
  e.length - 1
322
322
  ), i = await c(
323
- await e.streamBytes(r, a)
323
+ await e.streamBytes(n, a)
324
324
  );
325
325
  t = U(i, t);
326
326
  const s = new DataView(i.buffer);
@@ -331,36 +331,35 @@ async function Z(e) {
331
331
  if (t.byteLength < u + 4)
332
332
  throw new Error("Central directory not found");
333
333
  const l = s.getUint32(u, !0);
334
- if (l < r) {
334
+ if (l < n) {
335
335
  const d = await c(
336
- await e.streamBytes(l, r - 1)
336
+ await e.streamBytes(l, n - 1)
337
337
  );
338
338
  t = U(
339
339
  d,
340
340
  t
341
341
  );
342
- } else
343
- l > r && (t = t.slice(
344
- l - r
345
- ));
342
+ } else l > n && (t = t.slice(
343
+ l - n
344
+ ));
346
345
  return new Blob([t]).stream();
347
346
  }
348
- } while (r >= 0);
347
+ } while (n >= 0);
349
348
  throw new Error("Central directory not found");
350
349
  }
351
350
  function G() {
352
- let e = 0, n = [];
351
+ let e = 0, r = [];
353
352
  return new TransformStream({
354
- transform(t, r) {
355
- t.firstByteAt > e + I && (r.enqueue(n), n = []), e = t.lastByteAt, n.push(t);
353
+ transform(t, n) {
354
+ t.firstByteAt > e + I && (n.enqueue(r), r = []), e = t.lastByteAt, r.push(t);
356
355
  },
357
356
  flush(t) {
358
- t.enqueue(n);
357
+ t.enqueue(r);
359
358
  }
360
359
  });
361
360
  }
362
361
  function W(e) {
363
- let n = !1, t = 0, r;
362
+ let r = !1, t = 0, n;
364
363
  const a = [], i = new WritableStream({
365
364
  write(o, f) {
366
365
  o.length && (++t, Y(e, o).then((u) => {
@@ -372,20 +371,20 @@ function W(e) {
372
371
  }));
373
372
  },
374
373
  abort() {
375
- n = !0, r.close();
374
+ r = !0, n.close();
376
375
  },
377
376
  async close() {
378
- n = !0;
377
+ r = !0;
379
378
  }
380
379
  });
381
380
  return {
382
381
  readable: new ReadableStream({
383
382
  start(o) {
384
- r = o;
383
+ n = o;
385
384
  },
386
385
  async pull(o) {
387
386
  for (; ; ) {
388
- if (n && !a.length && t === 0) {
387
+ if (r && !a.length && t === 0) {
389
388
  o.close();
390
389
  return;
391
390
  }
@@ -410,35 +409,35 @@ function W(e) {
410
409
  writable: i
411
410
  };
412
411
  }
413
- async function Y(e, n) {
412
+ async function Y(e, r) {
414
413
  const t = await V.acquire();
415
414
  try {
416
- const r = n[n.length - 1];
415
+ const n = r[r.length - 1];
417
416
  return await e.streamBytes(
418
- n[0].firstByteAt,
419
- r.lastByteAt
417
+ r[0].firstByteAt,
418
+ n.lastByteAt
420
419
  );
421
420
  } finally {
422
421
  t();
423
422
  }
424
423
  }
425
424
  async function C(e) {
426
- return await fetch(e, { method: "HEAD" }).then((n) => n.headers.get("Content-Length")).then((n) => {
427
- if (!n)
425
+ return await fetch(e, { method: "HEAD" }).then((r) => r.headers.get("Content-Length")).then((r) => {
426
+ if (!r)
428
427
  throw new Error("Content-Length header is missing");
429
- const t = parseInt(n, 10);
428
+ const t = parseInt(r, 10);
430
429
  if (isNaN(t) || t < 0)
431
430
  throw new Error("Content-Length header is invalid");
432
431
  return t;
433
432
  });
434
433
  }
435
- async function $(e, n) {
436
- return n === void 0 && (n = await C(e)), {
437
- length: n,
438
- streamBytes: async (t, r) => await fetch(e, {
434
+ async function $(e, r) {
435
+ return r === void 0 && (r = await C(e)), {
436
+ length: r,
437
+ streamBytes: async (t, n) => await fetch(e, {
439
438
  headers: {
440
439
  // The Range header is inclusive, so we need to subtract 1
441
- Range: `bytes=${t}-${r - 1}`,
440
+ Range: `bytes=${t}-${n - 1}`,
442
441
  "Accept-Encoding": "none"
443
442
  }
444
443
  }).then((a) => a.body)
@@ -449,9 +448,9 @@ function se(e) {
449
448
  }
450
449
  function K() {
451
450
  const e = /* @__PURE__ */ new Map();
452
- let n = 0;
451
+ let r = 0;
453
452
  return new TransformStream({
454
- async transform(t, r) {
453
+ async transform(t, n) {
455
454
  const a = new Uint8Array(await t.arrayBuffer());
456
455
  let i = await c(
457
456
  new Blob([a]).stream().pipeThrough(new CompressionStream("gzip"))
@@ -474,12 +473,12 @@ function K() {
474
473
  path: o,
475
474
  extra: new Uint8Array(0)
476
475
  };
477
- e.set(n, f);
476
+ e.set(r, f);
478
477
  const u = j(f);
479
- r.enqueue(u), n += u.byteLength, r.enqueue(i), n += i.byteLength;
478
+ n.enqueue(u), r += u.byteLength, n.enqueue(i), r += i.byteLength;
480
479
  },
481
480
  flush(t) {
482
- const r = n;
481
+ const n = r;
483
482
  let a = 0;
484
483
  for (const [
485
484
  o,
@@ -491,8 +490,7 @@ function K() {
491
490
  fileComment: new Uint8Array(0),
492
491
  diskNumber: 1,
493
492
  internalAttributes: 0,
494
- externalAttributes: 0,
495
- firstByteAt: o
493
+ externalAttributes: 0
496
494
  }, l = J(
497
495
  u,
498
496
  o
@@ -502,7 +500,7 @@ function K() {
502
500
  const i = {
503
501
  signature: g,
504
502
  numberOfDisks: 1,
505
- centralDirectoryOffset: r,
503
+ centralDirectoryOffset: n,
506
504
  centralDirectorySize: a,
507
505
  centralDirectoryStartDisk: 1,
508
506
  numberCentralDirectoryRecordsOnThisDisk: e.size,
@@ -514,26 +512,26 @@ function K() {
514
512
  });
515
513
  }
516
514
  function j(e) {
517
- const n = new ArrayBuffer(
515
+ const r = new ArrayBuffer(
518
516
  30 + e.path.byteLength + e.extra.byteLength
519
- ), t = new DataView(n);
517
+ ), t = new DataView(r);
520
518
  t.setUint32(0, e.signature, !0), t.setUint16(4, e.version, !0), t.setUint16(6, e.generalPurpose, !0), t.setUint16(8, e.compressionMethod, !0), t.setUint16(10, e.lastModifiedDate, !0), t.setUint16(12, e.lastModifiedTime, !0), t.setUint32(14, e.crc, !0), t.setUint32(18, e.compressedSize, !0), t.setUint32(22, e.uncompressedSize, !0), t.setUint16(26, e.path.byteLength, !0), t.setUint16(28, e.extra.byteLength, !0);
521
- const r = new Uint8Array(n);
522
- return r.set(e.path, 30), r.set(e.extra, 30 + e.path.byteLength), r;
519
+ const n = new Uint8Array(r);
520
+ return n.set(e.path, 30), n.set(e.extra, 30 + e.path.byteLength), n;
523
521
  }
524
- function J(e, n) {
522
+ function J(e, r) {
525
523
  const t = new ArrayBuffer(
526
524
  46 + e.path.byteLength + e.extra.byteLength
527
- ), r = new DataView(t);
528
- r.setUint32(0, e.signature, !0), r.setUint16(4, e.versionCreated, !0), r.setUint16(6, e.versionNeeded, !0), r.setUint16(8, e.generalPurpose, !0), r.setUint16(10, e.compressionMethod, !0), r.setUint16(12, e.lastModifiedDate, !0), r.setUint16(14, e.lastModifiedTime, !0), r.setUint32(16, e.crc, !0), r.setUint32(20, e.compressedSize, !0), r.setUint32(24, e.uncompressedSize, !0), r.setUint16(28, e.path.byteLength, !0), r.setUint16(30, e.extra.byteLength, !0), r.setUint16(32, e.fileComment.byteLength, !0), r.setUint16(34, e.diskNumber, !0), r.setUint16(36, e.internalAttributes, !0), r.setUint32(38, e.externalAttributes, !0), r.setUint32(42, n, !0);
525
+ ), n = new DataView(t);
526
+ n.setUint32(0, e.signature, !0), n.setUint16(4, e.versionCreated, !0), n.setUint16(6, e.versionNeeded, !0), n.setUint16(8, e.generalPurpose, !0), n.setUint16(10, e.compressionMethod, !0), n.setUint16(12, e.lastModifiedDate, !0), n.setUint16(14, e.lastModifiedTime, !0), n.setUint32(16, e.crc, !0), n.setUint32(20, e.compressedSize, !0), n.setUint32(24, e.uncompressedSize, !0), n.setUint16(28, e.path.byteLength, !0), n.setUint16(30, e.extra.byteLength, !0), n.setUint16(32, e.fileComment.byteLength, !0), n.setUint16(34, e.diskNumber, !0), n.setUint16(36, e.internalAttributes, !0), n.setUint32(38, e.externalAttributes, !0), n.setUint32(42, r, !0);
529
527
  const a = new Uint8Array(t);
530
528
  return a.set(e.path, 46), a.set(e.extra, 46 + e.path.byteLength), a;
531
529
  }
532
530
  function Q(e) {
533
- const n = new ArrayBuffer(22 + e.comment.byteLength), t = new DataView(n);
531
+ const r = new ArrayBuffer(22 + e.comment.byteLength), t = new DataView(r);
534
532
  t.setUint32(0, e.signature, !0), t.setUint16(4, e.numberOfDisks, !0), t.setUint16(6, e.centralDirectoryStartDisk, !0), t.setUint16(8, e.numberCentralDirectoryRecordsOnThisDisk, !0), t.setUint16(10, e.numberCentralDirectoryRecords, !0), t.setUint32(12, e.centralDirectorySize, !0), t.setUint32(16, e.centralDirectoryOffset, !0), t.setUint16(20, e.comment.byteLength, !0);
535
- const r = new Uint8Array(n);
536
- return r.set(e.comment, 22), r;
533
+ const n = new Uint8Array(r);
534
+ return n.set(e.comment, 22), n;
537
535
  }
538
536
  export {
539
537
  ae as StreamedFile,