encoding-tools 0.0.4 → 0.0.6
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/AUTHORS.rst +18 -12
- package/README.md +4 -0
- package/bin2txt +177 -85
- package/{fs-worker.js → dist/bin2txt/fs-worker.js} +1 -1
- package/dist/bin2txt/index.html +31 -0
- package/dist/encoding-tools/fs-worker.js +1 -0
- package/dist/encoding-tools/index.html +31 -0
- package/dist/libbin2txt/fs-worker.js +1 -0
- package/dist/libbin2txt/index.html +31 -0
- package/dist/libtxt2bin/fs-worker.js +1 -0
- package/dist/libtxt2bin/index.html +31 -0
- package/dist/txt2bin/fs-worker.js +1 -0
- package/dist/txt2bin/index.html +31 -0
- package/encoding-tools +13 -7
- package/libbin2txt +353 -117
- package/libtxt2bin +197 -57
- package/package.json +37 -21
- package/txt2bin +306 -140
- package/bin2txt.js +0 -2
- package/libbin2txt.js +0 -2
- package/libtxt2bin.js +0 -2
- package/txt2bin.js +0 -2
package/AUTHORS.rst
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
..
|
|
2
2
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
Copyright © 2024, 2025, 2026
|
|
4
|
+
-------------------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
6
7
|
|
|
7
8
|
All rights reserved
|
|
8
|
-
|
|
9
|
+
-------------------------------------------------------
|
|
9
10
|
|
|
10
|
-
This program is free software: you can redistribute it
|
|
11
|
-
it under the terms of the
|
|
12
|
-
|
|
11
|
+
This program is free software: you can redistribute it
|
|
12
|
+
and/or modify it under the terms of the
|
|
13
|
+
GNU Affero General Public License as published by
|
|
14
|
+
the Free Software Foundation, either version 3 of the
|
|
13
15
|
License, or (at your option) any later version.
|
|
14
16
|
|
|
15
|
-
This program is distributed in the hope that it will
|
|
16
|
-
but WITHOUT ANY WARRANTY; without even the
|
|
17
|
-
MERCHANTABILITY or FITNESS FOR A
|
|
18
|
-
|
|
17
|
+
This program is distributed in the hope that it will
|
|
18
|
+
be useful, but WITHOUT ANY WARRANTY; without even the
|
|
19
|
+
implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
20
|
+
PARTICULAR PURPOSE.
|
|
21
|
+
See the GNU Affero General Public License
|
|
22
|
+
for more details.
|
|
19
23
|
|
|
20
|
-
You should have received a copy of the
|
|
21
|
-
|
|
24
|
+
You should have received a copy of the
|
|
25
|
+
GNU Affero General Public License
|
|
26
|
+
along with this program.
|
|
22
27
|
If not, see <https://www.gnu.org/licenses/>.
|
|
23
28
|
|
|
29
|
+
|
|
24
30
|
=========================
|
|
25
31
|
Encoding Tools Authors
|
|
26
32
|
=========================
|
package/README.md
CHANGED
package/bin2txt
CHANGED
|
@@ -27,15 +27,39 @@
|
|
|
27
27
|
* If not, see <https://www.gnu.org/licenses/>.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
/* eslint-disable
|
|
31
|
+
no-unused-vars */
|
|
32
|
+
|
|
33
|
+
/* Crash Javascript global variables */
|
|
34
|
+
|
|
35
|
+
/* global
|
|
36
|
+
runtime_environment:
|
|
37
|
+
writable */
|
|
38
|
+
|
|
30
39
|
const
|
|
31
40
|
_libcrash =
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
require(
|
|
42
|
+
'crash-js');
|
|
43
|
+
/* global
|
|
44
|
+
_argv_get */
|
|
45
|
+
const
|
|
46
|
+
_argv_get =
|
|
47
|
+
_libcrash._argv_get;
|
|
48
|
+
/* global
|
|
49
|
+
_argv_url_get */
|
|
50
|
+
const
|
|
51
|
+
_argv_url_get =
|
|
52
|
+
_libcrash._argv_url_get;
|
|
34
53
|
/* global
|
|
35
54
|
_cmdline_check */
|
|
36
55
|
const
|
|
37
56
|
_cmdline_check =
|
|
38
57
|
_libcrash._cmdline_check;
|
|
58
|
+
/* global
|
|
59
|
+
_get_date_human */
|
|
60
|
+
const
|
|
61
|
+
_get_date_human =
|
|
62
|
+
_libcrash._get_date_human;
|
|
39
63
|
/* global
|
|
40
64
|
_msg_info */
|
|
41
65
|
const
|
|
@@ -47,19 +71,19 @@ const
|
|
|
47
71
|
_msg_error =
|
|
48
72
|
_libcrash._msg_error;
|
|
49
73
|
/* global
|
|
50
|
-
|
|
74
|
+
_process_exit */
|
|
51
75
|
const
|
|
52
|
-
|
|
53
|
-
_libcrash.
|
|
54
|
-
|
|
76
|
+
_process_exit =
|
|
77
|
+
_libcrash._process_exit;
|
|
55
78
|
const
|
|
56
79
|
_encoding_tools =
|
|
57
80
|
require(
|
|
58
81
|
"./encoding-tools");
|
|
59
82
|
/* global
|
|
60
83
|
_bin2txt */
|
|
61
|
-
|
|
62
|
-
|
|
84
|
+
const
|
|
85
|
+
_bin2txt =
|
|
86
|
+
_encoding_tools._bin2txt;
|
|
63
87
|
|
|
64
88
|
function
|
|
65
89
|
_global_variables() {
|
|
@@ -73,6 +97,11 @@ function
|
|
|
73
97
|
writable */
|
|
74
98
|
app_opts =
|
|
75
99
|
[];
|
|
100
|
+
/* global
|
|
101
|
+
make_date:
|
|
102
|
+
writable */
|
|
103
|
+
make_date =
|
|
104
|
+
"";
|
|
76
105
|
/* global
|
|
77
106
|
encoding_format:
|
|
78
107
|
writable */
|
|
@@ -103,6 +132,11 @@ function
|
|
|
103
132
|
writable */
|
|
104
133
|
amount_only =
|
|
105
134
|
"";
|
|
135
|
+
/* global
|
|
136
|
+
verbose:
|
|
137
|
+
writable */
|
|
138
|
+
verbose =
|
|
139
|
+
"";
|
|
106
140
|
/* global
|
|
107
141
|
quiet:
|
|
108
142
|
writable */
|
|
@@ -112,39 +146,52 @@ function
|
|
|
112
146
|
|
|
113
147
|
function
|
|
114
148
|
_overrides_set() {
|
|
115
|
-
if (
|
|
149
|
+
if ( make_date == "" ) {
|
|
150
|
+
make_date =
|
|
151
|
+
_get_date_human();
|
|
152
|
+
}
|
|
153
|
+
if ( encoding_format == "" ||
|
|
154
|
+
typeof(
|
|
155
|
+
encoding_format) == "undefined" ) {
|
|
116
156
|
encoding_format =
|
|
117
157
|
"base64";
|
|
118
158
|
}
|
|
119
|
-
if ( string_length == ""
|
|
159
|
+
if ( string_length == "" ||
|
|
160
|
+
typeof(
|
|
161
|
+
string_length) == "undefined" ) {
|
|
120
162
|
string_length =
|
|
121
163
|
"10000";
|
|
122
164
|
}
|
|
123
|
-
if ( buffer_size == ""
|
|
165
|
+
if ( buffer_size == "" ||
|
|
166
|
+
typeof(
|
|
167
|
+
buffer_size) == "undefined" ) {
|
|
124
168
|
buffer_size =
|
|
125
169
|
"2000000"; // 2MB
|
|
126
170
|
}
|
|
127
|
-
if ( amount_only ==
|
|
171
|
+
if ( amount_only == "" ||
|
|
172
|
+
typeof(
|
|
173
|
+
amount_only) == "undefined" ) {
|
|
128
174
|
amount_only =
|
|
129
|
-
false;
|
|
175
|
+
"false";
|
|
130
176
|
}
|
|
131
177
|
}
|
|
132
178
|
|
|
133
179
|
function
|
|
134
180
|
_config_show() {
|
|
135
181
|
let
|
|
136
|
-
_line
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
182
|
+
_line;
|
|
183
|
+
const
|
|
184
|
+
_text = [
|
|
185
|
+
`${app_name} configuration:`,
|
|
186
|
+
` Call date: ${make_date}`,
|
|
187
|
+
` Runtime environment: ${runtime_environment}`,
|
|
188
|
+
` Encoding format: ${encoding_format}`,
|
|
189
|
+
` Buffer size: ${buffer_size}`,
|
|
190
|
+
` Chunk string length: ${string_length}`,
|
|
191
|
+
` Chunks amount only: ${amount_only}`,
|
|
192
|
+
` In file: ${in_file}`,
|
|
193
|
+
` Out text prefix: ${out_txt_prefix}`,
|
|
194
|
+
];
|
|
148
195
|
for ( _line of _text ) {
|
|
149
196
|
_msg_info(
|
|
150
197
|
_line);
|
|
@@ -155,62 +202,84 @@ function
|
|
|
155
202
|
_usage(
|
|
156
203
|
_exit_code) {
|
|
157
204
|
let
|
|
158
|
-
_line
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
205
|
+
_line;
|
|
206
|
+
const
|
|
207
|
+
_text = [
|
|
208
|
+
"Converts binary to ascii text.",
|
|
209
|
+
"",
|
|
210
|
+
"Usage:",
|
|
211
|
+
"",
|
|
212
|
+
" bin2txt",
|
|
213
|
+
" <in-file>",
|
|
214
|
+
" <out-txt-prefix>",
|
|
215
|
+
"",
|
|
216
|
+
" arguments:",
|
|
217
|
+
" <in-file> An input file.",
|
|
218
|
+
" <out-file-prefix> Prefix for the output file(s).",
|
|
219
|
+
"",
|
|
220
|
+
" options:",
|
|
221
|
+
"",
|
|
222
|
+
" -f --encoding-format Encoding format ('base64').",
|
|
223
|
+
` <encoding-format> Default: '${encoding_format}'.`,
|
|
224
|
+
"",
|
|
225
|
+
" -B --buffer-size Size in bytes the input file will",
|
|
226
|
+
" <buffer-size> be split before being read",
|
|
227
|
+
" in memory and passed to",
|
|
228
|
+
" the encoder.",
|
|
229
|
+
` Default: '${buffer_size}'.`,
|
|
230
|
+
"",
|
|
231
|
+
" -L --string-length String chunk length.",
|
|
232
|
+
` <string-length> Default: '${string_length}'`,
|
|
233
|
+
"",
|
|
234
|
+
" -s --amount-only Only print chunks amount.",
|
|
235
|
+
` Default: '${amount_only}'.`,
|
|
236
|
+
"",
|
|
237
|
+
" -h --help This message.",
|
|
238
|
+
" -v --verbose Enable verbose output.",
|
|
239
|
+
""
|
|
240
|
+
];
|
|
193
241
|
for ( _line of _text ) {
|
|
194
242
|
console.log(
|
|
195
243
|
_line);
|
|
196
244
|
}
|
|
197
|
-
|
|
245
|
+
_process_exit(
|
|
198
246
|
_exit_code);
|
|
199
247
|
}
|
|
200
248
|
|
|
201
249
|
function
|
|
202
250
|
_cmdline_parse() {
|
|
203
251
|
let
|
|
204
|
-
_argv,
|
|
205
252
|
_help_display,
|
|
206
253
|
_msg;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
254
|
+
const
|
|
255
|
+
_argv_args = {
|
|
256
|
+
"booleans": [
|
|
257
|
+
"h",
|
|
258
|
+
"help",
|
|
259
|
+
"v",
|
|
260
|
+
"verbose"
|
|
261
|
+
]
|
|
262
|
+
};
|
|
263
|
+
const
|
|
264
|
+
_argv =
|
|
265
|
+
_argv_get(
|
|
266
|
+
_argv_args);
|
|
267
|
+
const
|
|
268
|
+
_options =
|
|
269
|
+
_argv[
|
|
270
|
+
"_"];
|
|
212
271
|
quiet =
|
|
213
272
|
"y";
|
|
273
|
+
_help_display =
|
|
274
|
+
false;
|
|
275
|
+
if ( "h" in _argv ) {
|
|
276
|
+
_help_display =
|
|
277
|
+
true;
|
|
278
|
+
}
|
|
279
|
+
if ( "help" in _argv ) {
|
|
280
|
+
_help_display =
|
|
281
|
+
true;
|
|
282
|
+
}
|
|
214
283
|
runtime_environment =
|
|
215
284
|
"node";
|
|
216
285
|
if ( _options.indexOf(
|
|
@@ -223,6 +292,7 @@ function
|
|
|
223
292
|
if ( _help_display ) {
|
|
224
293
|
quiet =
|
|
225
294
|
"n";
|
|
295
|
+
_overrides_set();
|
|
226
296
|
_usage(
|
|
227
297
|
0);
|
|
228
298
|
}
|
|
@@ -248,26 +318,34 @@ function
|
|
|
248
318
|
in_file +
|
|
249
319
|
".base64";
|
|
250
320
|
}
|
|
251
|
-
if ( "
|
|
321
|
+
if ( "L" in _argv ) {
|
|
252
322
|
string_length =
|
|
253
323
|
_argv[
|
|
254
|
-
"
|
|
324
|
+
"L"];
|
|
255
325
|
}
|
|
256
326
|
if ( "string-length" in _argv ) {
|
|
257
327
|
string_length =
|
|
258
328
|
_argv[
|
|
259
329
|
"string-length"];
|
|
260
330
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
331
|
+
if ( "s" in _argv ) {
|
|
332
|
+
amount_only =
|
|
333
|
+
_argv[
|
|
334
|
+
"s"];
|
|
335
|
+
}
|
|
336
|
+
if ( "amount-only" in _argv ) {
|
|
337
|
+
amount_only =
|
|
338
|
+
_argv[
|
|
339
|
+
"amount-only"];
|
|
340
|
+
}
|
|
341
|
+
if ( "v" in _argv ) {
|
|
342
|
+
verbose =
|
|
343
|
+
true;
|
|
344
|
+
}
|
|
345
|
+
if ( "verbose" in _argv ) {
|
|
346
|
+
verbose =
|
|
347
|
+
true;
|
|
348
|
+
}
|
|
271
349
|
if ( verbose ) {
|
|
272
350
|
quiet =
|
|
273
351
|
"n";
|
|
@@ -276,20 +354,28 @@ function
|
|
|
276
354
|
|
|
277
355
|
function
|
|
278
356
|
_url_parse() {
|
|
279
|
-
let
|
|
280
|
-
_argv;
|
|
281
357
|
runtime_environment =
|
|
282
358
|
"browser";
|
|
283
|
-
_argv =
|
|
284
|
-
_argv_url_get();
|
|
285
359
|
in_file =
|
|
286
360
|
_argv_url_get(
|
|
287
361
|
"in_file")[
|
|
288
362
|
0];
|
|
289
|
-
|
|
363
|
+
out_txt_prefix =
|
|
290
364
|
_argv_url_get(
|
|
291
365
|
"out_txt_prefix")[
|
|
292
366
|
0];
|
|
367
|
+
string_length =
|
|
368
|
+
_argv_url_get(
|
|
369
|
+
"string_length")[
|
|
370
|
+
0];
|
|
371
|
+
amount_only =
|
|
372
|
+
_argv_url_get(
|
|
373
|
+
"amount_only")[
|
|
374
|
+
0];
|
|
375
|
+
verbose =
|
|
376
|
+
_argv_url_get(
|
|
377
|
+
"verbose")[
|
|
378
|
+
0];
|
|
293
379
|
quiet =
|
|
294
380
|
_argv_url_get(
|
|
295
381
|
"quiet");
|
|
@@ -297,11 +383,17 @@ function
|
|
|
297
383
|
quiet =
|
|
298
384
|
"n";
|
|
299
385
|
}
|
|
386
|
+
if ( verbose ) {
|
|
387
|
+
quiet =
|
|
388
|
+
"n";
|
|
389
|
+
}
|
|
300
390
|
}
|
|
301
391
|
|
|
302
392
|
_global_variables();
|
|
303
393
|
if ( _cmdline_check(
|
|
304
|
-
"bin2txt.js")
|
|
394
|
+
"bin2txt.js") ||
|
|
395
|
+
_cmdline_check(
|
|
396
|
+
"bin2txt") ) {
|
|
305
397
|
_cmdline_parse();
|
|
306
398
|
}
|
|
307
399
|
_overrides_set();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=
|
|
1
|
+
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
---------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
7
|
+
|
|
8
|
+
All rights reserved
|
|
9
|
+
---------------------------------------------
|
|
10
|
+
|
|
11
|
+
This program is free software: you can
|
|
12
|
+
redistribute it and/or modify it under the
|
|
13
|
+
terms of the GNU Affero General Public
|
|
14
|
+
License as published by the Free Software
|
|
15
|
+
Foundation, either version 3 of the License,
|
|
16
|
+
or (at your option) any later version.
|
|
17
|
+
|
|
18
|
+
This program is distributed in the hope that
|
|
19
|
+
it will be useful, but WITHOUT ANY WARRANTY;
|
|
20
|
+
without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
PURPOSE. See the GNU Affero General Public
|
|
23
|
+
License for more details.
|
|
24
|
+
|
|
25
|
+
You should have received a copy of the GNU
|
|
26
|
+
Affero General Public License
|
|
27
|
+
along with this program.
|
|
28
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
<script src="bin2txt.js"></script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
---------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
7
|
+
|
|
8
|
+
All rights reserved
|
|
9
|
+
---------------------------------------------
|
|
10
|
+
|
|
11
|
+
This program is free software: you can
|
|
12
|
+
redistribute it and/or modify it under the
|
|
13
|
+
terms of the GNU Affero General Public
|
|
14
|
+
License as published by the Free Software
|
|
15
|
+
Foundation, either version 3 of the License,
|
|
16
|
+
or (at your option) any later version.
|
|
17
|
+
|
|
18
|
+
This program is distributed in the hope that
|
|
19
|
+
it will be useful, but WITHOUT ANY WARRANTY;
|
|
20
|
+
without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
PURPOSE. See the GNU Affero General Public
|
|
23
|
+
License for more details.
|
|
24
|
+
|
|
25
|
+
You should have received a copy of the GNU
|
|
26
|
+
Affero General Public License
|
|
27
|
+
along with this program.
|
|
28
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
<script src="encoding-tools.js"></script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
---------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
7
|
+
|
|
8
|
+
All rights reserved
|
|
9
|
+
---------------------------------------------
|
|
10
|
+
|
|
11
|
+
This program is free software: you can
|
|
12
|
+
redistribute it and/or modify it under the
|
|
13
|
+
terms of the GNU Affero General Public
|
|
14
|
+
License as published by the Free Software
|
|
15
|
+
Foundation, either version 3 of the License,
|
|
16
|
+
or (at your option) any later version.
|
|
17
|
+
|
|
18
|
+
This program is distributed in the hope that
|
|
19
|
+
it will be useful, but WITHOUT ANY WARRANTY;
|
|
20
|
+
without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
PURPOSE. See the GNU Affero General Public
|
|
23
|
+
License for more details.
|
|
24
|
+
|
|
25
|
+
You should have received a copy of the GNU
|
|
26
|
+
Affero General Public License
|
|
27
|
+
along with this program.
|
|
28
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
<script src="libbin2txt.js"></script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
---------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
7
|
+
|
|
8
|
+
All rights reserved
|
|
9
|
+
---------------------------------------------
|
|
10
|
+
|
|
11
|
+
This program is free software: you can
|
|
12
|
+
redistribute it and/or modify it under the
|
|
13
|
+
terms of the GNU Affero General Public
|
|
14
|
+
License as published by the Free Software
|
|
15
|
+
Foundation, either version 3 of the License,
|
|
16
|
+
or (at your option) any later version.
|
|
17
|
+
|
|
18
|
+
This program is distributed in the hope that
|
|
19
|
+
it will be useful, but WITHOUT ANY WARRANTY;
|
|
20
|
+
without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
PURPOSE. See the GNU Affero General Public
|
|
23
|
+
License for more details.
|
|
24
|
+
|
|
25
|
+
You should have received a copy of the GNU
|
|
26
|
+
Affero General Public License
|
|
27
|
+
along with this program.
|
|
28
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
<script src="libtxt2bin.js"></script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
---------------------------------------------
|
|
5
|
+
Copyright © 2024, 2025, 2026
|
|
6
|
+
Pellegrino Prevete
|
|
7
|
+
|
|
8
|
+
All rights reserved
|
|
9
|
+
---------------------------------------------
|
|
10
|
+
|
|
11
|
+
This program is free software: you can
|
|
12
|
+
redistribute it and/or modify it under the
|
|
13
|
+
terms of the GNU Affero General Public
|
|
14
|
+
License as published by the Free Software
|
|
15
|
+
Foundation, either version 3 of the License,
|
|
16
|
+
or (at your option) any later version.
|
|
17
|
+
|
|
18
|
+
This program is distributed in the hope that
|
|
19
|
+
it will be useful, but WITHOUT ANY WARRANTY;
|
|
20
|
+
without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
PURPOSE. See the GNU Affero General Public
|
|
23
|
+
License for more details.
|
|
24
|
+
|
|
25
|
+
You should have received a copy of the GNU
|
|
26
|
+
Affero General Public License
|
|
27
|
+
along with this program.
|
|
28
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
<script src="txt2bin.js"></script>
|
package/encoding-tools
CHANGED
|
@@ -29,14 +29,20 @@ const
|
|
|
29
29
|
_bin2txt_module =
|
|
30
30
|
require(
|
|
31
31
|
"./libbin2txt");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const
|
|
33
|
+
_bin2txt =
|
|
34
|
+
_bin2txt_module._bin2txt;
|
|
35
|
+
const
|
|
36
|
+
_txt2bin_module =
|
|
37
|
+
require(
|
|
38
|
+
"./libtxt2bin");
|
|
39
|
+
const
|
|
40
|
+
_txt2bin =
|
|
41
|
+
_txt2bin_module._txt2bin;
|
|
36
42
|
|
|
37
43
|
module.exports = {
|
|
38
44
|
_bin2txt:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
_bin2txt,
|
|
46
|
+
_txt2bin:
|
|
47
|
+
_txt2bin
|
|
42
48
|
};
|