node-pkware 2.0.0 → 3.0.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.
Files changed (59) hide show
  1. package/README.md +42 -40
  2. package/dist/ExpandingBuffer.d.ts +53 -0
  3. package/dist/ExpandingBuffer.js +134 -0
  4. package/dist/ExpandingBuffer.js.map +1 -0
  5. package/dist/Explode.d.ts +8 -0
  6. package/dist/Explode.js +309 -0
  7. package/dist/Explode.js.map +1 -0
  8. package/dist/Implode.d.ts +11 -0
  9. package/dist/Implode.js +305 -0
  10. package/dist/Implode.js.map +1 -0
  11. package/dist/bin/explode.d.ts +2 -0
  12. package/dist/bin/explode.js +59 -0
  13. package/dist/bin/explode.js.map +1 -0
  14. package/dist/bin/helpers.d.ts +8 -0
  15. package/dist/bin/helpers.js +65 -0
  16. package/dist/bin/helpers.js.map +1 -0
  17. package/dist/bin/implode.d.ts +2 -0
  18. package/dist/bin/implode.js +79 -0
  19. package/dist/bin/implode.js.map +1 -0
  20. package/dist/constants.d.ts +32 -0
  21. package/dist/constants.js +114 -0
  22. package/dist/constants.js.map +1 -0
  23. package/{types → dist}/errors.d.ts +13 -11
  24. package/dist/errors.js +52 -0
  25. package/dist/errors.js.map +1 -0
  26. package/dist/functions.d.ts +11 -0
  27. package/dist/functions.js +73 -0
  28. package/dist/functions.js.map +1 -0
  29. package/dist/index.d.ts +20 -0
  30. package/dist/index.js +54 -0
  31. package/dist/index.js.map +1 -0
  32. package/{types/helpers → dist}/stream.d.ts +13 -34
  33. package/dist/stream.js +205 -0
  34. package/dist/stream.js.map +1 -0
  35. package/dist/tsconfig.tsbuildinfo +1 -0
  36. package/dist/types.d.ts +25 -0
  37. package/dist/types.js +3 -0
  38. package/dist/types.js.map +1 -0
  39. package/package.json +14 -45
  40. package/bin/explode.js +0 -78
  41. package/bin/implode.js +0 -116
  42. package/src/constants.js +0 -139
  43. package/src/errors.js +0 -50
  44. package/src/explode.js +0 -411
  45. package/src/helpers/ExpandingBuffer.js +0 -123
  46. package/src/helpers/functions.js +0 -150
  47. package/src/helpers/stream.js +0 -190
  48. package/src/helpers/testing.js +0 -80
  49. package/src/implode.js +0 -364
  50. package/src/index.js +0 -18
  51. package/tsconfig.json +0 -20
  52. package/types/constants.d.ts +0 -41
  53. package/types/explode.d.ts +0 -56
  54. package/types/helpers/ExpandingBuffer.d.ts +0 -25
  55. package/types/helpers/Shared.d.ts +0 -46
  56. package/types/helpers/functions.d.ts +0 -15
  57. package/types/helpers/testing.d.ts +0 -6
  58. package/types/implode.d.ts +0 -63
  59. package/types/index.d.ts +0 -8
package/dist/index.js ADDED
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.stream = exports.errors = exports.DictionarySize = exports.Compression = exports.compress = exports.decompress = exports.implode = exports.explode = void 0;
27
+ const Explode_1 = require("./Explode");
28
+ const Implode_1 = require("./Implode");
29
+ /**
30
+ * Decompresses stream
31
+ * @returns a function that you can use as a `transform._transform` method.
32
+ */
33
+ const explode = (config = {}) => {
34
+ const instance = new Explode_1.Explode(config);
35
+ return instance.getHandler();
36
+ };
37
+ exports.explode = explode;
38
+ exports.decompress = exports.explode;
39
+ /**
40
+ * Compresses stream
41
+ * @returns a function that you can use as a `transform._transform` method.
42
+ */
43
+ const implode = (compressionType, dictionarySize, config = {}) => {
44
+ const instance = new Implode_1.Implode(compressionType, dictionarySize, config);
45
+ return instance.getHandler();
46
+ };
47
+ exports.implode = implode;
48
+ exports.compress = exports.implode;
49
+ var constants_1 = require("./constants");
50
+ Object.defineProperty(exports, "Compression", { enumerable: true, get: function () { return constants_1.Compression; } });
51
+ Object.defineProperty(exports, "DictionarySize", { enumerable: true, get: function () { return constants_1.DictionarySize; } });
52
+ exports.errors = __importStar(require("./errors"));
53
+ exports.stream = __importStar(require("./stream"));
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAmC;AACnC,uCAAmC;AAGnC;;;GAGG;AACI,MAAM,OAAO,GAAG,CAAC,SAAiB,EAAE,EAAE,EAAE;IAC7C,MAAM,QAAQ,GAAG,IAAI,iBAAO,CAAC,MAAM,CAAC,CAAA;IACpC,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAA;AAC9B,CAAC,CAAA;AAHY,QAAA,OAAO,WAGnB;AAWmB,qBAdP,eAAO,CAcU;AAT9B;;;GAGG;AACI,MAAM,OAAO,GAAG,CAAC,eAA4B,EAAE,cAA8B,EAAE,SAAiB,EAAE,EAAE,EAAE;IAC3G,MAAM,QAAQ,GAAG,IAAI,iBAAO,CAAC,eAAe,EAAE,cAAc,EAAE,MAAM,CAAC,CAAA;IACrE,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAA;AAC9B,CAAC,CAAA;AAHY,QAAA,OAAO,WAGnB;AAGmB,mBANP,eAAO,CAMQ;AAE5B,yCAAyD;AAAhD,wGAAA,WAAW,OAAA;AAAE,2GAAA,cAAc,OAAA;AACpC,mDAAkC;AAClC,mDAAkC"}
@@ -1,15 +1,6 @@
1
- import { Transform, Writable } from 'stream'
2
- import { Callback } from './Shared'
3
-
4
- type QuasiTransformConstructorParameter = (
5
- obj: {
6
- handler: QuasiTransformConstructorParameter
7
- handle(chunk: Buffer, encoding: string): Promise<void>
8
- },
9
- chunk: Buffer,
10
- encoding: string
11
- ) => void
12
-
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Transform, Writable, TransformCallback } from 'node:stream';
13
4
  /**
14
5
  * Creates a "**predicate**" function, that awaits Buffers, keeps an internal counter of the bytes from them and splits the appropriate buffer at the given index.
15
6
  * Splitting is done by returning an array with `[left: Buffer, right: Buffer, isLeftDone: bool]`.
@@ -19,43 +10,31 @@ type QuasiTransformConstructorParameter = (
19
10
  * 3. `[emptyBuffer, inputBuffer, true]`
20
11
  * 4. `[emptyBuffer, inputBuffer, true]`
21
12
  * 5. ... and so on
22
- * @param index at which to split the buffer
13
+ * @param index - a positive integer at which to split the buffer
23
14
  */
24
- export function splitAt(index: number): (chunk: Buffer) => null | [Buffer, Buffer, boolean]
25
-
15
+ export declare const splitAt: (index: number) => (chunk: Buffer) => [Buffer, Buffer, boolean];
26
16
  /**
27
- * A `transform._transform` type function, which lets the input chunks through without any change
17
+ * A `transform._transform` type function, which lets the input chunks through without any changes
28
18
  */
29
- export function transformIdentity(): (chunk: Buffer, encoding: unknown, callback: Callback) => void
30
-
19
+ export declare const transformIdentity: () => (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void;
31
20
  /**
32
21
  * A `transform._transform` type function, which for every input chunk will output an empty buffer
33
22
  */
34
- export function transformEmpty(): (chunk: unknown, encoding: unknown, callback: Callback) => void
35
-
23
+ export declare const transformEmpty: () => (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void;
36
24
  /**
37
25
  * Takes a `transform._transform` type function and turns it into a Transform stream instance
38
- * @param handler a transform._transform type function
26
+ * @param handler a `transform._transform` type function
39
27
  * @returns a Transform stream instance
40
28
  */
41
- export function through(handler: Exclude<ConstructorParameters<typeof Transform>[0], undefined>['transform']): Transform
42
-
29
+ export declare const through: (handler: (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void) => Transform;
43
30
  /**
44
31
  * Higher order function for introducing conditional logic to `transform._transform` functions.
45
32
  * This is used internally to handle offsets for `explode()`.
46
- * @param predicate
47
- * @param leftHandler
48
- * @param rightHandler
49
- * @returns `transform._transform`
33
+ * @returns a `transform._transform` type function
50
34
  */
51
- export function transformSplitBy(
52
- predicate: (chunk: Buffer) => [Buffer, Buffer, boolean],
53
- leftHandler: QuasiTransformConstructorParameter,
54
- rightHandler: QuasiTransformConstructorParameter
55
- ): (chunk: Buffer, encoding: string, callback: Callback) => void
56
-
35
+ export declare const transformSplitBy: (predicate: (chunk: Buffer) => [Buffer, Buffer, boolean], leftHandler: (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void, rightHandler: (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void) => (this: Transform, chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback) => void;
57
36
  /**
58
37
  * Data can be piped to the returned function from a stream and it will concatenate all chunks into a single buffer.
59
38
  * @param done a callback function, which will receive the concatenated buffer as a parameter
60
39
  */
61
- export function streamToBuffer(done: (heap: Buffer) => void): Writable
40
+ export declare const toBuffer: (done: (buffer: Buffer) => void) => Writable;
package/dist/stream.js ADDED
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toBuffer = exports.transformSplitBy = exports.through = exports.transformEmpty = exports.transformIdentity = exports.splitAt = void 0;
4
+ const node_stream_1 = require("node:stream");
5
+ const node_util_1 = require("node:util");
6
+ const functions_1 = require("./functions");
7
+ const ExpandingBuffer_1 = require("./ExpandingBuffer");
8
+ const constants_1 = require("./constants");
9
+ class QuasiTransform {
10
+ #handler;
11
+ _flush;
12
+ constructor(handler) {
13
+ this.#handler = handler;
14
+ }
15
+ handle(chunk, encoding) {
16
+ return (0, node_util_1.promisify)(this.#handler).call(this, chunk, encoding);
17
+ }
18
+ }
19
+ /**
20
+ * Creates a "**predicate**" function, that awaits Buffers, keeps an internal counter of the bytes from them and splits the appropriate buffer at the given index.
21
+ * Splitting is done by returning an array with `[left: Buffer, right: Buffer, isLeftDone: bool]`.
22
+ * If you want to split data at the 100th byte and you keep feeding 60 byte long buffers to the function returned by `splitAt(100)`, then it will return arrays in the following manner:
23
+ * 1. `[inputBuffer, emptyBuffer, false]`
24
+ * 2. `[inputBuffer.slice(0, 40), inputBuffer.slice(40, 60), true]`
25
+ * 3. `[emptyBuffer, inputBuffer, true]`
26
+ * 4. `[emptyBuffer, inputBuffer, true]`
27
+ * 5. ... and so on
28
+ * @param index - a positive integer at which to split the buffer
29
+ */
30
+ const splitAt = (index) => {
31
+ let cntr = 0;
32
+ return (chunk) => {
33
+ let left;
34
+ let right;
35
+ let isLeftDone;
36
+ if (index <= cntr) {
37
+ // index ..... cntr ..... chunk.length
38
+ left = constants_1.EMPTY_BUFFER;
39
+ right = chunk;
40
+ isLeftDone = true;
41
+ }
42
+ else if (index >= cntr + chunk.length) {
43
+ // cntr ..... chunk.length ..... index
44
+ left = chunk;
45
+ right = constants_1.EMPTY_BUFFER;
46
+ isLeftDone = index === cntr + chunk.length;
47
+ }
48
+ else {
49
+ // cntr ..... index ..... chunk.length
50
+ left = chunk.subarray(0, index - cntr);
51
+ right = chunk.subarray(index - cntr);
52
+ isLeftDone = true;
53
+ }
54
+ cntr += chunk.length;
55
+ return [left, right, isLeftDone];
56
+ };
57
+ };
58
+ exports.splitAt = splitAt;
59
+ /**
60
+ * A `transform._transform` type function, which lets the input chunks through without any changes
61
+ */
62
+ const transformIdentity = () => {
63
+ return function (chunk, encoding, callback) {
64
+ callback(null, chunk);
65
+ };
66
+ };
67
+ exports.transformIdentity = transformIdentity;
68
+ /**
69
+ * A `transform._transform` type function, which for every input chunk will output an empty buffer
70
+ */
71
+ const transformEmpty = () => {
72
+ return function (chunk, encoding, callback) {
73
+ callback(null, constants_1.EMPTY_BUFFER);
74
+ };
75
+ };
76
+ exports.transformEmpty = transformEmpty;
77
+ /**
78
+ * Takes a `transform._transform` type function and turns it into a Transform stream instance
79
+ * @param handler a `transform._transform` type function
80
+ * @returns a Transform stream instance
81
+ */
82
+ const through = (handler) => {
83
+ return new node_stream_1.Transform({
84
+ transform: handler,
85
+ });
86
+ };
87
+ exports.through = through;
88
+ /**
89
+ * Higher order function for introducing conditional logic to `transform._transform` functions.
90
+ * This is used internally to handle offsets for `explode()`.
91
+ * @returns a `transform._transform` type function
92
+ */
93
+ const transformSplitBy = (predicate, leftHandler, rightHandler) => {
94
+ let isFirstChunk = true;
95
+ let wasLeftFlushCalled = false;
96
+ const damChunkSize = 0x10000;
97
+ const dam = new ExpandingBuffer_1.ExpandingBuffer();
98
+ const leftTransform = new QuasiTransform(leftHandler);
99
+ const rightTransform = new QuasiTransform(rightHandler);
100
+ return function (chunk, encoding, callback) {
101
+ const [left, right, isLeftDone] = predicate(chunk);
102
+ const _left = leftTransform.handle(left, encoding);
103
+ const _right = rightTransform.handle(right, encoding);
104
+ if (isFirstChunk) {
105
+ isFirstChunk = false;
106
+ this._flush = (flushCallback) => {
107
+ if (!dam.isEmpty()) {
108
+ this.push(dam.read());
109
+ }
110
+ const leftFiller = new Promise((resolve, reject) => {
111
+ if (wasLeftFlushCalled || !(0, functions_1.isFunction)(leftTransform._flush)) {
112
+ resolve(constants_1.EMPTY_BUFFER);
113
+ return;
114
+ }
115
+ leftTransform._flush((err, data) => {
116
+ if (err) {
117
+ reject(err);
118
+ }
119
+ else {
120
+ resolve(data);
121
+ }
122
+ });
123
+ });
124
+ const rightFiller = new Promise((resolve, reject) => {
125
+ if (!(0, functions_1.isFunction)(rightTransform._flush)) {
126
+ resolve(constants_1.EMPTY_BUFFER);
127
+ return;
128
+ }
129
+ rightTransform._flush((err, data) => {
130
+ if (err) {
131
+ reject(err);
132
+ }
133
+ else {
134
+ resolve(data);
135
+ }
136
+ });
137
+ });
138
+ Promise.all([leftFiller, rightFiller])
139
+ .then((buffers) => {
140
+ // TODO: TransformCallback assumes the returned data is any instead of Buffer
141
+ flushCallback(null, Buffer.concat(buffers));
142
+ })
143
+ .catch((err) => {
144
+ flushCallback(err);
145
+ });
146
+ };
147
+ }
148
+ const filler = new Promise((resolve, reject) => {
149
+ if (isLeftDone && !wasLeftFlushCalled && (0, functions_1.isFunction)(leftTransform._flush)) {
150
+ wasLeftFlushCalled = true;
151
+ leftTransform._flush((err, data) => {
152
+ if (err) {
153
+ reject(err);
154
+ }
155
+ else {
156
+ resolve(data);
157
+ }
158
+ });
159
+ }
160
+ else {
161
+ resolve(constants_1.EMPTY_BUFFER);
162
+ }
163
+ });
164
+ Promise.all([_left, filler, _right])
165
+ .then((buffers) => {
166
+ // TODO: TransformCallback assumes the returned data is any instead of Buffer
167
+ dam.append(Buffer.concat(buffers));
168
+ if (dam.size() > damChunkSize) {
169
+ const chunks = Math.floor(dam.size() / damChunkSize);
170
+ const data = Buffer.from(dam.read(0, chunks * damChunkSize));
171
+ dam.flushStart(chunks * damChunkSize);
172
+ for (let i = 0; i < chunks - 1; i++) {
173
+ this.push(data.subarray(i * damChunkSize, i * damChunkSize + damChunkSize));
174
+ }
175
+ callback(null, data.subarray((chunks - 1) * damChunkSize));
176
+ }
177
+ else {
178
+ callback(null, constants_1.EMPTY_BUFFER);
179
+ }
180
+ })
181
+ .catch((err) => {
182
+ callback(err);
183
+ });
184
+ };
185
+ };
186
+ exports.transformSplitBy = transformSplitBy;
187
+ /**
188
+ * Data can be piped to the returned function from a stream and it will concatenate all chunks into a single buffer.
189
+ * @param done a callback function, which will receive the concatenated buffer as a parameter
190
+ */
191
+ const toBuffer = (done) => {
192
+ const buffer = new ExpandingBuffer_1.ExpandingBuffer();
193
+ return new node_stream_1.Writable({
194
+ write(chunk, encoding, callback) {
195
+ buffer.append(chunk);
196
+ callback();
197
+ },
198
+ final(callback) {
199
+ done(buffer.getHeap());
200
+ callback();
201
+ },
202
+ });
203
+ };
204
+ exports.toBuffer = toBuffer;
205
+ //# sourceMappingURL=stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":";;;AAAA,6CAAoE;AACpE,yCAAqC;AACrC,2CAAwC;AACxC,uDAAmD;AACnD,2CAA0C;AAE1C,MAAM,cAAc;IAClB,QAAQ,CAAiG;IACzG,MAAM,CAAwC;IAE9C,YACE,OAAwG;QAExG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,QAAwB;QAC5C,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAA;IAC7D,CAAC;CACF;AAED;;;;;;;;;;GAUG;AACI,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE;IACvC,IAAI,IAAI,GAAG,CAAC,CAAA;IAEZ,OAAO,CAAC,KAAa,EAAE,EAAE;QACvB,IAAI,IAAY,CAAA;QAChB,IAAI,KAAa,CAAA;QACjB,IAAI,UAAmB,CAAA;QAEvB,IAAI,KAAK,IAAI,IAAI,EAAE;YACjB,sCAAsC;YACtC,IAAI,GAAG,wBAAY,CAAA;YACnB,KAAK,GAAG,KAAK,CAAA;YACb,UAAU,GAAG,IAAI,CAAA;SAClB;aAAM,IAAI,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE;YACvC,sCAAsC;YACtC,IAAI,GAAG,KAAK,CAAA;YACZ,KAAK,GAAG,wBAAY,CAAA;YACpB,UAAU,GAAG,KAAK,KAAK,IAAI,GAAG,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AE,CAAA;IACpC,OAAO,IAAI,sBAAQ,CAAC;QAClB,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ;YAC7B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACpB,QAAQ,EAAE,CAAA;QACZ,CAAC;QACD,KAAK,CAAC,QAAQ;YACZ,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;YACtB,QAAQ,EAAE,CAAA;QACZ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAZY,QAAA,QAAQ,YAYpB"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.full.d.ts","../src/functions.ts","../src/ExpandingBuffer.ts","../src/constants.ts","../src/errors.ts","../src/types.ts","../src/Explode.ts","../src/Implode.ts","../src/stream.ts","../src/index.ts","../node_modules/minimist-lite/index.d.ts","../src/bin/helpers.ts","../src/bin/explode.ts","../src/bin/implode.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","impliedFormat":1},{"version":"1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","impliedFormat":1},{"version":"746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","impliedFormat":1},{"version":"d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","impliedFormat":1},{"version":"aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c","impliedFormat":1},{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true,"impliedFormat":1},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true,"impliedFormat":1},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true,"impliedFormat":1},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true,"impliedFormat":1},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141","impliedFormat":1},{"version":"d33d48700ff2784440d47a57691114887e9c138687191d59979c48dbe8f60703","signature":"11363321a159b3914a17102ef65b80d46fe7a06c7458bfac7c759c0d69d455cd","impliedFormat":1},{"version":"6826cb9452465a58afe06ec859ced5a288dcb43bb06a718fac32cdfde24b0662","signature":"cd1ec19e482d430caea4090e37f1fc177523e63587b7fe4e4e2664d6f2bd1f06","impliedFormat":1},{"version":"edeb03a7fea6dce2157b57805676bbb4c358f44b3441c5a6be2a3559edc8cfcd","signature":"7c1a322d77c99e02b37aa237e9b4504e00babf9ae910201cf0499cf7ac19dc2e","impliedFormat":1},{"version":"50203ba92ac31db920b3fb6d5d003d4730a8c9c82aea560edeb6cf3da83314d6","signature":"267e68045efff8a776a4bbd54a5dba858c07d1ddd8ef05f9dce9331a0d58a9a2","impliedFormat":1},{"version":"6dfa12b1154c2c6ec4108d1d657bb53fee7afb135fd7c2ae393480bff8256b25","signature":"08ac6ea1f43c1e8765ccd89b217ae54c8279b2f6ce09aa0c79a79eb6ba3cf9af","impliedFormat":1},{"version":"9a7cbb02902bc3b39f976906761896b065f379689630a1b64c274b9ebfe0a886","signature":"e2663c8ae5bda39e5fd81a6dc8ae823569874b392957683974e08c6a1ae752c2","impliedFormat":1},{"version":"0e1b7deca5cb3e2444b53354d2412b0d4ff1b7d3a8d35d3309c36be66df66f5e","signature":"66816b30129d34442e9b4b6cb02ec625638e0ecb72f2eb914af7ec847e7fa576","impliedFormat":1},{"version":"e35cdbda5581a519c97f026e0cb67333550f7307490dfb867691acce6e10a33f","signature":"4d6e4a7592f5bb6566cb4f34e273e5deb5fed578461e9d1108eeeaa67ee394fa","impliedFormat":1},{"version":"4af6f4a28c180410bbb309d747f54e6ba914cc050db82aa82f74de6b36d1d376","signature":"39bf69545e84508967467a60cc31dfbb7dc6752befe7595c9c4a58104ef14863","impliedFormat":1},{"version":"f45a31ff499c535733fff759ef39ef806268e6b345187302f17d84aa4c760e53","impliedFormat":1},{"version":"3199ee444f360e0950fcbbbb89032feed6ee7e1c3b90ae28acfb93839adb3c01","signature":"a1d7519b9902634301b992fac3cfb073bbee7cbc7ef70d364594a66110472747","impliedFormat":1},{"version":"4de1fa9a4bdf2f7b9257478d80bac84552f3d497c10627a743dd5f681c4bd893","signature":"56d175a186f63a2b930b5355482b04520c24893fde6aa7e45742b55b0a38eea1","impliedFormat":1},{"version":"c99693c5676024863926a21ac3b53683dfe2f28124859df715cbb41751a2b876","signature":"56d175a186f63a2b930b5355482b04520c24893fde6aa7e45742b55b0a38eea1","impliedFormat":1},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true,"impliedFormat":1},{"version":"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9","impliedFormat":1},{"version":"bb65c6267c5d6676be61acbf6604cf0a4555ac4b505df58ac15c831fcbff4e3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","impliedFormat":1},{"version":"f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true,"impliedFormat":1},{"version":"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","impliedFormat":1},{"version":"d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","impliedFormat":1},{"version":"5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","impliedFormat":1},{"version":"04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","impliedFormat":1},{"version":"dbe5aa5a5dd8bd1c6a8d11b1310c3f0cdabaacc78a37b394a8c7b14faeb5fb84","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true,"impliedFormat":1},{"version":"d076fede3cb042e7b13fc29442aaa03a57806bc51e2b26a67a01fbc66a7c0c12","impliedFormat":1},{"version":"7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"213fc4f2b172d8beb74b77d7c1b41488d67348066d185e4263470cbb010cd6e8","impliedFormat":1},{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7db71191aa7aac5d6bc927ed6e7075c2763d22c7238227ec0c63c8cf5cb6a8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","impliedFormat":1},{"version":"ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"8dbe725f8d237e70310977afcfa011629804d101ebaa0266cafda6b61ad72236","impliedFormat":1}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"module":1,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"fileIdsList":[[73,119],[76,119],[77,82,110,119],[78,89,90,97,107,118,119],[78,79,89,97,119],[80,119],[81,82,90,98,119],[82,107,115,119],[83,85,89,97,119],[84,119],[85,86,119],[89,119],[87,89,119],[89,90,91,107,118,119],[89,90,91,104,107,110,119],[119,123],[119],[85,92,97,107,118,119],[89,90,92,93,97,107,115,118,119],[92,94,107,115,118,119],[73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],[89,95,119],[96,118,119],[85,89,97,107,119],[98,119],[99,119],[76,100,119],[101,117,119,123],[102,119],[103,119],[89,104,105,119],[104,106,119,121],[77,89,107,108,109,110,119],[77,107,109,119],[107,108,119],[110,119],[111,119],[89,113,114,119],[113,114,119],[82,97,107,115,119],[116,119],[97,117,119],[77,92,103,118,119],[82,119],[107,119,120],[119,121],[119,122],[77,82,89,91,100,107,118,119,121,123],[107,119,124],[60,77,119],[60,61,62,63,64,77,107,119],[64,67,68,69,70,119],[90,99,119],[62,64,67,68,69,70,119],[62,63,64,65,66,67,119],[60,61,62,107,119],[77],[64,77,107],[62,64,77,107],[62,63,64,67,107],[107]],"referencedMap":[[73,1],[74,1],[76,2],[77,3],[78,4],[79,5],[80,6],[81,7],[82,8],[83,9],[84,10],[85,11],[86,11],[88,12],[87,13],[89,12],[90,14],[91,15],[75,16],[125,17],[92,18],[93,19],[94,20],[126,21],[95,22],[96,23],[97,24],[98,25],[99,26],[100,27],[101,28],[102,29],[103,30],[104,31],[105,31],[106,32],[107,33],[109,34],[108,35],[110,36],[111,37],[112,17],[113,38],[114,39],[115,40],[116,41],[117,42],[118,43],[119,44],[120,45],[121,46],[122,47],[123,48],[124,49],[69,17],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[39,17],[36,17],[37,17],[38,17],[40,17],[7,17],[41,17],[46,17],[47,17],[42,17],[43,17],[44,17],[45,17],[8,17],[51,17],[48,17],[49,17],[50,17],[52,17],[9,17],[53,17],[54,17],[55,17],[56,17],[57,17],[1,17],[10,17],[59,17],[58,17],[14,17],[13,17],[61,50],[65,51],[66,51],[71,52],[70,53],[72,54],[62,17],[63,17],[60,17],[68,55],[67,56],[64,17]],"exportedModulesMap":[[73,1],[74,1],[76,2],[77,3],[78,4],[79,5],[80,6],[81,7],[82,8],[83,9],[84,10],[85,11],[86,11],[88,12],[87,13],[89,12],[90,14],[91,15],[75,16],[125,17],[92,18],[93,19],[94,20],[126,21],[95,22],[96,23],[97,24],[98,25],[99,26],[100,27],[101,28],[102,29],[103,30],[104,31],[105,31],[106,32],[107,33],[109,34],[108,35],[110,36],[111,37],[112,17],[113,38],[114,39],[115,40],[116,41],[117,42],[118,43],[119,44],[120,45],[121,46],[122,47],[123,48],[124,49],[69,17],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[39,17],[36,17],[37,17],[38,17],[40,17],[7,17],[41,17],[46,17],[47,17],[42,17],[43,17],[44,17],[45,17],[8,17],[51,17],[48,17],[49,17],[50,17],[52,17],[9,17],[53,17],[54,17],[55,17],[56,17],[57,17],[1,17],[10,17],[59,17],[58,17],[14,17],[13,17],[61,57],[65,58],[66,59],[68,60],[67,61]],"semanticDiagnosticsPerFile":[73,74,76,77,78,79,80,81,82,83,84,85,86,88,87,89,90,91,75,125,92,93,94,126,95,96,97,98,99,100,101,102,103,104,105,106,107,109,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,69,11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,56,57,1,10,59,58,14,13,61,65,66,71,70,72,62,63,60,68,67,64]},"version":"4.9.4"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Configuration options for the implode & explode functions.
3
+ */
4
+ export type Config = {
5
+ /**
6
+ * Whether the code should display extra messages on the console or not
7
+ * @default false
8
+ */
9
+ verbose?: boolean;
10
+ /**
11
+ * The starting size of the input buffer, may expand later as needed.
12
+ * Not having to expand may have positive performance impact.
13
+ * @default 0
14
+ */
15
+ inputBufferSize?: number;
16
+ /**
17
+ * The starting size of the output buffer, may expand later as needed.
18
+ * Not having to expand may have positive performance impact.
19
+ * @default 0
20
+ */
21
+ outputBufferSize?: number;
22
+ };
23
+ export type Stats = {
24
+ chunkCounter: number;
25
+ };
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,25 +1,21 @@
1
1
  {
2
2
  "name": "node-pkware",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "The nodejs implementation of StormLib's pkware compressor/de-compressor",
5
- "main": "src/index.js",
6
- "types": "types/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "engines": {
8
- "npm": ">=5.3.0",
9
- "node": ">=8.5.0"
8
+ "npm": ">=8.0.0",
9
+ "node": ">=18.0.0"
10
10
  },
11
11
  "bin": {
12
- "explode": "bin/explode.js",
13
- "implode": "bin/implode.js"
12
+ "explode": "dist/bin/explode.js",
13
+ "implode": "dist/bin/implode.js"
14
14
  },
15
15
  "scripts": {
16
- "lint": "eslint \"{bin,src,test}/**/*.{js,ts}\"",
17
- "lint:fix": "npm run lint -- --fix",
18
- "lint:staged": "lint-staged",
19
- "test:unit": "set FORCE_COLOR=true && mocha test/**/*.spec.js --timeout 5000",
20
- "test:unit:watch": "nodemon --exec \"npm run test:unit\" --watch test --watch src",
21
- "test:files": "set FORCE_COLOR=true && mocha test/**/*.files.js --timeout 10000",
22
- "test:files:watch": "nodemon --exec \"npm run test:files\" --watch test --watch src"
16
+ "build": "tsc",
17
+ "dev": "tsc --watch",
18
+ "prepublishOnly": "npm run build"
23
19
  },
24
20
  "repository": {
25
21
  "type": "git",
@@ -32,39 +28,11 @@
32
28
  "author": "Lajos Meszaros <m_lajos@hotmail.com>",
33
29
  "license": "GPL-3.0-or-later",
34
30
  "dependencies": {
35
- "minimist-lite": "^2.2.1",
36
- "ramda": "^0.28.0"
31
+ "minimist-lite": "^2.2.1"
37
32
  },
38
33
  "devDependencies": {
39
- "@types/node": "^18.11.10",
40
- "arx-header-size": "^2.0.0",
41
- "binary-comparator": "^0.5.0",
42
- "esbuild": "^0.15.16",
43
- "eslint": "^8.28.0",
44
- "eslint-config-prettier": "^8.5.0",
45
- "eslint-config-prettier-standard": "^4.0.1",
46
- "eslint-config-standard": "^17.0.0",
47
- "eslint-plugin-import": "^2.26.0",
48
- "eslint-plugin-node": "^11.1.0",
49
- "eslint-plugin-prettier": "^4.2.1",
50
- "eslint-plugin-promise": "^6.1.1",
51
- "eslint-plugin-ramda": "^2.5.1",
52
- "eslint-plugin-standard": "^4.1.0",
53
- "lint-staged": "^13.0.4",
54
- "mocha": "^10.1.0",
55
- "nodemon": "^2.0.20",
56
- "pre-commit": "^1.2.2",
57
- "prettier": "^2.8.0",
58
- "prettier-config-standard": "^5.0.0",
59
- "typescript": "^4.9.3"
60
- },
61
- "pre-commit": [
62
- "lint:staged",
63
- "test:unit",
64
- "test:files"
65
- ],
66
- "lint-staged": {
67
- "*.js": "eslint --fix"
34
+ "@types/node": "^18.11.15",
35
+ "typescript": "^4.9.4"
68
36
  },
69
37
  "keywords": [
70
38
  "arx-fatalis",
@@ -73,6 +41,7 @@
73
41
  "implode",
74
42
  "explode",
75
43
  "compression",
44
+ "decompression",
76
45
  "blast"
77
46
  ]
78
47
  }
package/bin/explode.js DELETED
@@ -1,78 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs')
4
- const minimist = require('minimist-lite')
5
- const { getPackageVersion, parseNumberString, fileExists } = require('../src/helpers/functions.js')
6
- const { transformEmpty, transformIdentity, transformSplitBy, splitAt, through } = require('../src/helpers/stream.js')
7
- const { explode } = require('../src/explode.js')
8
-
9
- const args = minimist(process.argv.slice(2), {
10
- string: ['output', 'offset', 'input-buffer-size', 'output-buffer-size'],
11
- boolean: ['version', 'drop-before-offset', 'verbose'],
12
- alias: {
13
- v: 'version',
14
- },
15
- })
16
-
17
- const decompress = (input, output, offset, keepHeader, config) => {
18
- const leftHandler = keepHeader ? transformIdentity() : transformEmpty()
19
- const rightHandler = explode(config)
20
-
21
- const handler = transformSplitBy(splitAt(offset), leftHandler, rightHandler)
22
-
23
- return new Promise((resolve, reject) => {
24
- input.pipe(through(handler).on('error', reject)).pipe(output).on('finish', resolve).on('error', reject)
25
- })
26
- }
27
-
28
- ;(async () => {
29
- if (args.version) {
30
- const version = await getPackageVersion()
31
- console.log(`node-pkware - version ${version}`)
32
- process.exit(0)
33
- }
34
-
35
- let input = args._[0] || args.input
36
- let output = args.output
37
-
38
- let hasErrors = false
39
-
40
- if (input) {
41
- if (await fileExists(input)) {
42
- input = fs.createReadStream(input)
43
- } else {
44
- console.error('error: input file does not exist')
45
- hasErrors = true
46
- }
47
- } else {
48
- input = process.openStdin()
49
- }
50
-
51
- if (output) {
52
- output = fs.createWriteStream(output)
53
- } else {
54
- output = process.stdout
55
- }
56
-
57
- if (hasErrors) {
58
- process.exit(1)
59
- }
60
-
61
- const offset = parseNumberString(args.offset, 0)
62
-
63
- const keepHeader = !args['drop-before-offset']
64
- const config = {
65
- verbose: args.verbose,
66
- inputBufferSize: parseNumberString(args['input-buffer-size'], 0x10000),
67
- outputBufferSize: parseNumberString(args['output-buffer-size'], 0x40000),
68
- }
69
-
70
- decompress(input, output, offset, keepHeader, config)
71
- .then(() => {
72
- process.exit(0)
73
- })
74
- .catch((e) => {
75
- console.error(`error: ${e.message}`)
76
- process.exit(1)
77
- })
78
- })()