iconv-nano 0.0.0-stage → 0.0.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.
Files changed (95) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +62 -2
  3. package/dist/_virtual/_rolldown/runtime.js +18 -0
  4. package/dist/codecs/single-byte/ibm866.d.ts +8 -0
  5. package/dist/codecs/single-byte/ibm866.js +22 -0
  6. package/dist/codecs/single-byte/iso-8859-10.d.ts +8 -0
  7. package/dist/codecs/single-byte/iso-8859-10.js +22 -0
  8. package/dist/codecs/single-byte/iso-8859-13.d.ts +8 -0
  9. package/dist/codecs/single-byte/iso-8859-13.js +22 -0
  10. package/dist/codecs/single-byte/iso-8859-14.d.ts +8 -0
  11. package/dist/codecs/single-byte/iso-8859-14.js +22 -0
  12. package/dist/codecs/single-byte/iso-8859-15.d.ts +8 -0
  13. package/dist/codecs/single-byte/iso-8859-15.js +22 -0
  14. package/dist/codecs/single-byte/iso-8859-16.d.ts +8 -0
  15. package/dist/codecs/single-byte/iso-8859-16.js +22 -0
  16. package/dist/codecs/single-byte/iso-8859-2.d.ts +8 -0
  17. package/dist/codecs/single-byte/iso-8859-2.js +22 -0
  18. package/dist/codecs/single-byte/iso-8859-3.d.ts +8 -0
  19. package/dist/codecs/single-byte/iso-8859-3.js +22 -0
  20. package/dist/codecs/single-byte/iso-8859-4.d.ts +8 -0
  21. package/dist/codecs/single-byte/iso-8859-4.js +22 -0
  22. package/dist/codecs/single-byte/iso-8859-5.d.ts +8 -0
  23. package/dist/codecs/single-byte/iso-8859-5.js +22 -0
  24. package/dist/codecs/single-byte/iso-8859-6.d.ts +8 -0
  25. package/dist/codecs/single-byte/iso-8859-6.js +22 -0
  26. package/dist/codecs/single-byte/iso-8859-7.d.ts +8 -0
  27. package/dist/codecs/single-byte/iso-8859-7.js +22 -0
  28. package/dist/codecs/single-byte/iso-8859-8-i.d.ts +8 -0
  29. package/dist/codecs/single-byte/iso-8859-8-i.js +22 -0
  30. package/dist/codecs/single-byte/iso-8859-8.d.ts +8 -0
  31. package/dist/codecs/single-byte/iso-8859-8.js +22 -0
  32. package/dist/codecs/single-byte/koi8-r.d.ts +8 -0
  33. package/dist/codecs/single-byte/koi8-r.js +22 -0
  34. package/dist/codecs/single-byte/koi8-u.d.ts +8 -0
  35. package/dist/codecs/single-byte/koi8-u.js +22 -0
  36. package/dist/codecs/single-byte/macintosh.d.ts +8 -0
  37. package/dist/codecs/single-byte/macintosh.js +22 -0
  38. package/dist/codecs/single-byte/windows-1250.d.ts +8 -0
  39. package/dist/codecs/single-byte/windows-1250.js +22 -0
  40. package/dist/codecs/single-byte/windows-1251.d.ts +8 -0
  41. package/dist/codecs/single-byte/windows-1251.js +22 -0
  42. package/dist/codecs/single-byte/windows-1252.d.ts +8 -0
  43. package/dist/codecs/single-byte/windows-1252.js +22 -0
  44. package/dist/codecs/single-byte/windows-1253.d.ts +8 -0
  45. package/dist/codecs/single-byte/windows-1253.js +22 -0
  46. package/dist/codecs/single-byte/windows-1254.d.ts +8 -0
  47. package/dist/codecs/single-byte/windows-1254.js +22 -0
  48. package/dist/codecs/single-byte/windows-1255.d.ts +8 -0
  49. package/dist/codecs/single-byte/windows-1255.js +22 -0
  50. package/dist/codecs/single-byte/windows-1256.d.ts +8 -0
  51. package/dist/codecs/single-byte/windows-1256.js +22 -0
  52. package/dist/codecs/single-byte/windows-1257.d.ts +8 -0
  53. package/dist/codecs/single-byte/windows-1257.js +22 -0
  54. package/dist/codecs/single-byte/windows-1258.d.ts +8 -0
  55. package/dist/codecs/single-byte/windows-1258.js +22 -0
  56. package/dist/codecs/single-byte/windows-874.d.ts +8 -0
  57. package/dist/codecs/single-byte/windows-874.js +22 -0
  58. package/dist/codecs/single-byte/x-mac-cyrillic.d.ts +8 -0
  59. package/dist/codecs/single-byte/x-mac-cyrillic.js +22 -0
  60. package/dist/codecs/utf-8.d.ts +8 -0
  61. package/dist/codecs/utf-8.js +21 -0
  62. package/dist/encodings/ibm866.js +1 -0
  63. package/dist/encodings/iso-8859-10.js +1 -0
  64. package/dist/encodings/iso-8859-13.js +1 -0
  65. package/dist/encodings/iso-8859-14.js +1 -0
  66. package/dist/encodings/iso-8859-15.js +1 -0
  67. package/dist/encodings/iso-8859-16.js +1 -0
  68. package/dist/encodings/iso-8859-2.js +1 -0
  69. package/dist/encodings/iso-8859-3.js +1 -0
  70. package/dist/encodings/iso-8859-4.js +1 -0
  71. package/dist/encodings/iso-8859-5.js +1 -0
  72. package/dist/encodings/iso-8859-6.js +1 -0
  73. package/dist/encodings/iso-8859-7.js +1 -0
  74. package/dist/encodings/iso-8859-8.js +1 -0
  75. package/dist/encodings/koi8-r.js +1 -0
  76. package/dist/encodings/koi8-u.js +1 -0
  77. package/dist/encodings/macintosh.js +1 -0
  78. package/dist/encodings/windows-1250.js +1 -0
  79. package/dist/encodings/windows-1251.js +1 -0
  80. package/dist/encodings/windows-1252.js +1 -0
  81. package/dist/encodings/windows-1253.js +1 -0
  82. package/dist/encodings/windows-1254.js +1 -0
  83. package/dist/encodings/windows-1255.js +1 -0
  84. package/dist/encodings/windows-1256.js +1 -0
  85. package/dist/encodings/windows-1257.js +1 -0
  86. package/dist/encodings/windows-1258.js +1 -0
  87. package/dist/encodings/windows-874.js +1 -0
  88. package/dist/encodings/x-mac-cyrillic.js +1 -0
  89. package/dist/index.d.ts +30 -0
  90. package/dist/index.js +31 -0
  91. package/dist/interfaces.d.ts +11 -0
  92. package/dist/utils/encodeSingleByteEncoding.js +14 -0
  93. package/dist/utils/getCachedTextDecoder.js +15 -0
  94. package/dist/utils/getCachedTextEncoder.js +8 -0
  95. package/package.json +52 -4
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ Copyright 2026 Jeremy Nguyen
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,3 +1,63 @@
1
- # Temporary Holding Version
1
+ # iconv-nano
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [github-actions]: https://www.github.com/jeremy-code/iconv-nano/actions/workflows/ci.yml
4
+ [github-actions-badge]: https://www.github.com/jeremy-code/iconv-nano/actions/workflows/ci.yml/badge.svg
5
+ [license-badge]: https://img.shields.io/github/license/jeremy-code/iconv-nano
6
+ [npm-version-badge]: https://img.shields.io/npm/v/iconv-nano
7
+ [npm-package]: https://www.npmjs.com/package/iconv-nano
8
+
9
+ [![GitHub Actions][github-actions-badge]][github-actions] [![License][license-badge]](LICENSE) [![NPM version][npm-version-badge]][npm-package]
10
+
11
+ You probably shouldn't use this for now.
12
+
13
+ I'm waiting on ESM [namespace imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#namespace_import) in Rolldown ([rolldown/rolldown#7874](https://github.com/rolldown/rolldown/issues/7874)) to be supported. It looks like it will be coming on Rolldown 1.4.
14
+
15
+ Documentation is avaliable at this URL: https://npmx.dev/package-docs/iconv-nano.
16
+
17
+ ## Usage
18
+
19
+ ```js
20
+ import * as iconv from "iconv-nano";
21
+
22
+ iconv.utf8.encode("😅").toHex(); // "f09f9885"
23
+ iconv.utf8.decode(Uint8Array.fromHex("f09f9885")); // "😅"
24
+
25
+ iconv.ascii.encode("😅").toHex(); // "3f3f"
26
+ iconv.ascii.decode(Uint8Array.fromHex("3f3f")); // "??"
27
+ ```
28
+
29
+ ## Supported encodings
30
+
31
+ - UTF-8
32
+ - IBM866
33
+ - ISO-8859-2
34
+ - ISO-8859-3
35
+ - ISO-8859-4
36
+ - ISO-8859-5
37
+ - ISO-8859-6
38
+ - ISO-8859-7
39
+ - ISO-8859-8
40
+ - ISO-8859-8-1
41
+ - ISO-8859-10
42
+ - ISO-8859-13
43
+ - ISO-8859-14
44
+ - ISO-8859-15
45
+ - ISO-8859-16
46
+ - KOI8-R
47
+ - KOI8-U
48
+ - macintosh
49
+ - windows-874
50
+ - windows-1250
51
+ - windows-1251
52
+ - windows-1252
53
+ - windows-1253
54
+ - windows-1254
55
+ - windows-1255
56
+ - windows-1256
57
+ - windows-1257
58
+ - windows-1258
59
+ - x-mac-cyrillic
60
+
61
+ ## License
62
+
63
+ This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,18 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (!no_symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __exportAll };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace ibm866_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, ibm866_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import ibm866_default from "../../encodings/ibm866.js";
3
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
4
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
5
+
6
+ //#region src/codecs/single-byte/ibm866.ts
7
+ var ibm866_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, ibm866_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("ibm866", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, ibm866_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_10_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_10_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_10_default from "../../encodings/iso-8859-10.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-10.ts
7
+ var iso_8859_10_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_10_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-10", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_10_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_13_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_13_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_13_default from "../../encodings/iso-8859-13.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-13.ts
7
+ var iso_8859_13_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_13_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-13", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_13_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_14_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_14_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_14_default from "../../encodings/iso-8859-14.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-14.ts
7
+ var iso_8859_14_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_14_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-14", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_14_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_15_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_15_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_15_default from "../../encodings/iso-8859-15.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-15.ts
7
+ var iso_8859_15_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_15_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-15", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_15_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_16_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_16_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_16_default from "../../encodings/iso-8859-16.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-16.ts
7
+ var iso_8859_16_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_16_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-16", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_16_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_2_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_2_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_2_default from "../../encodings/iso-8859-2.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-2.ts
7
+ var iso_8859_2_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_2_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-2", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_2_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_3_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_3_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_3_default from "../../encodings/iso-8859-3.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-3.ts
7
+ var iso_8859_3_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_3_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-3", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_3_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_4_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_4_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_4_default from "../../encodings/iso-8859-4.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-4.ts
7
+ var iso_8859_4_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_4_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-4", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_4_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_5_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_5_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_5_default from "../../encodings/iso-8859-5.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-5.ts
7
+ var iso_8859_5_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_5_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-5", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_5_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_6_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_6_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_6_default from "../../encodings/iso-8859-6.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-6.ts
7
+ var iso_8859_6_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_6_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-6", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_6_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_7_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_7_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_7_default from "../../encodings/iso-8859-7.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-7.ts
7
+ var iso_8859_7_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_7_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-7", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_7_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_8_i_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_8_i_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_8_default from "../../encodings/iso-8859-8.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-8-i.ts
7
+ var iso_8859_8_i_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_8_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-8-i", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_8_i_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace iso_8859_8_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, iso_8859_8_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import iso_8859_8_default from "../../encodings/iso-8859-8.js";
5
+
6
+ //#region src/codecs/single-byte/iso-8859-8.ts
7
+ var iso_8859_8_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, iso_8859_8_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("iso-8859-8", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, iso_8859_8_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace koi8_r_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, koi8_r_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import koi8_r_default from "../../encodings/koi8-r.js";
5
+
6
+ //#region src/codecs/single-byte/koi8-r.ts
7
+ var koi8_r_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, koi8_r_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("koi8-r", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, koi8_r_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace koi8_u_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, koi8_u_d_exports };
@@ -0,0 +1,22 @@
1
+ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
+ import { encodeSingleByteEncoding } from "../../utils/encodeSingleByteEncoding.js";
3
+ import { getCachedTextDecoder } from "../../utils/getCachedTextDecoder.js";
4
+ import koi8_u_default from "../../encodings/koi8-u.js";
5
+
6
+ //#region src/codecs/single-byte/koi8-u.ts
7
+ var koi8_u_exports = /* @__PURE__ */ __exportAll({
8
+ decode: () => decode,
9
+ encode: () => encode
10
+ });
11
+ const encode = (input) => {
12
+ return encodeSingleByteEncoding(input, koi8_u_default);
13
+ };
14
+ const decode = (input, decodeOptions) => {
15
+ return getCachedTextDecoder("koi8-u", {
16
+ fatal: false,
17
+ ignoreBOM: decodeOptions?.stripBOM ?? true
18
+ }).decode(input);
19
+ };
20
+
21
+ //#endregion
22
+ export { decode, encode, koi8_u_exports };
@@ -0,0 +1,8 @@
1
+ import { BufferSource, DecodeOptions } from "../../interfaces.js";
2
+ declare namespace macintosh_d_exports {
3
+ export { decode, encode };
4
+ }
5
+ declare const encode: (input: string) => Uint8Array<ArrayBuffer>;
6
+ declare const decode: (input: BufferSource, decodeOptions?: DecodeOptions) => string;
7
+ //#endregion
8
+ export { decode, encode, macintosh_d_exports };