@dusted/anqst 1.0.0 → 1.5.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 (76) hide show
  1. package/README.md +15 -0
  2. package/dist/src/app.js +103 -77
  3. package/dist/src/base93.js +124 -0
  4. package/dist/src/build-stamp.js +1 -1
  5. package/dist/src/codecgenerators/basecodecemitters/bigint-qint64/decoder.js +35 -0
  6. package/dist/src/codecgenerators/basecodecemitters/bigint-qint64/encoder.js +36 -0
  7. package/dist/src/codecgenerators/basecodecemitters/bigint-quint64/decoder.js +26 -0
  8. package/dist/src/codecgenerators/basecodecemitters/bigint-quint64/encoder.js +38 -0
  9. package/dist/src/codecgenerators/basecodecemitters/binary-blob/decoder.js +28 -0
  10. package/dist/src/codecgenerators/basecodecemitters/binary-blob/encoder.js +34 -0
  11. package/dist/src/codecgenerators/basecodecemitters/binary-buffer/decoder.js +29 -0
  12. package/dist/src/codecgenerators/basecodecemitters/binary-buffer/encoder.js +36 -0
  13. package/dist/src/codecgenerators/basecodecemitters/binary-float32Array/decoder.js +46 -0
  14. package/dist/src/codecgenerators/basecodecemitters/binary-float32Array/encoder.js +49 -0
  15. package/dist/src/codecgenerators/basecodecemitters/binary-float64Array/decoder.js +46 -0
  16. package/dist/src/codecgenerators/basecodecemitters/binary-float64Array/encoder.js +47 -0
  17. package/dist/src/codecgenerators/basecodecemitters/binary-int16Array/decoder.js +46 -0
  18. package/dist/src/codecgenerators/basecodecemitters/binary-int16Array/encoder.js +49 -0
  19. package/dist/src/codecgenerators/basecodecemitters/binary-int32Array/decoder.js +50 -0
  20. package/dist/src/codecgenerators/basecodecemitters/binary-int32Array/encoder.js +52 -0
  21. package/dist/src/codecgenerators/basecodecemitters/binary-int8Array/decoder.js +38 -0
  22. package/dist/src/codecgenerators/basecodecemitters/binary-int8Array/encoder.js +44 -0
  23. package/dist/src/codecgenerators/basecodecemitters/binary-typedArray/decoder.js +33 -0
  24. package/dist/src/codecgenerators/basecodecemitters/binary-typedArray/encoder.js +34 -0
  25. package/dist/src/codecgenerators/basecodecemitters/binary-uint16Array/decoder.js +46 -0
  26. package/dist/src/codecgenerators/basecodecemitters/binary-uint16Array/encoder.js +49 -0
  27. package/dist/src/codecgenerators/basecodecemitters/binary-uint32Array/decoder.js +46 -0
  28. package/dist/src/codecgenerators/basecodecemitters/binary-uint32Array/encoder.js +49 -0
  29. package/dist/src/codecgenerators/basecodecemitters/binary-uint8Array/decoder.js +28 -0
  30. package/dist/src/codecgenerators/basecodecemitters/binary-uint8Array/encoder.js +34 -0
  31. package/dist/src/codecgenerators/basecodecemitters/boolean/decoder.js +34 -0
  32. package/dist/src/codecgenerators/basecodecemitters/boolean/encoder.js +40 -0
  33. package/dist/src/codecgenerators/basecodecemitters/dynamic-json/decoder.js +43 -0
  34. package/dist/src/codecgenerators/basecodecemitters/dynamic-json/encoder.js +45 -0
  35. package/dist/src/codecgenerators/basecodecemitters/dynamic-object/decoder.js +44 -0
  36. package/dist/src/codecgenerators/basecodecemitters/dynamic-object/encoder.js +46 -0
  37. package/dist/src/codecgenerators/basecodecemitters/integer-int16/decoder.js +32 -0
  38. package/dist/src/codecgenerators/basecodecemitters/integer-int16/encoder.js +43 -0
  39. package/dist/src/codecgenerators/basecodecemitters/integer-int32/decoder.js +26 -0
  40. package/dist/src/codecgenerators/basecodecemitters/integer-int32/encoder.js +37 -0
  41. package/dist/src/codecgenerators/basecodecemitters/integer-int8/decoder.js +26 -0
  42. package/dist/src/codecgenerators/basecodecemitters/integer-int8/encoder.js +37 -0
  43. package/dist/src/codecgenerators/basecodecemitters/integer-qint16/decoder.js +36 -0
  44. package/dist/src/codecgenerators/basecodecemitters/integer-qint16/encoder.js +36 -0
  45. package/dist/src/codecgenerators/basecodecemitters/integer-qint32/decoder.js +25 -0
  46. package/dist/src/codecgenerators/basecodecemitters/integer-qint32/encoder.js +36 -0
  47. package/dist/src/codecgenerators/basecodecemitters/integer-qint8/decoder.js +36 -0
  48. package/dist/src/codecgenerators/basecodecemitters/integer-qint8/encoder.js +36 -0
  49. package/dist/src/codecgenerators/basecodecemitters/integer-quint16/decoder.js +26 -0
  50. package/dist/src/codecgenerators/basecodecemitters/integer-quint16/encoder.js +38 -0
  51. package/dist/src/codecgenerators/basecodecemitters/integer-quint32/decoder.js +27 -0
  52. package/dist/src/codecgenerators/basecodecemitters/integer-quint32/encoder.js +39 -0
  53. package/dist/src/codecgenerators/basecodecemitters/integer-quint8/decoder.js +26 -0
  54. package/dist/src/codecgenerators/basecodecemitters/integer-quint8/encoder.js +38 -0
  55. package/dist/src/codecgenerators/basecodecemitters/integer-uint16/decoder.js +30 -0
  56. package/dist/src/codecgenerators/basecodecemitters/integer-uint16/encoder.js +42 -0
  57. package/dist/src/codecgenerators/basecodecemitters/integer-uint32/decoder.js +31 -0
  58. package/dist/src/codecgenerators/basecodecemitters/integer-uint32/encoder.js +43 -0
  59. package/dist/src/codecgenerators/basecodecemitters/integer-uint8/decoder.js +30 -0
  60. package/dist/src/codecgenerators/basecodecemitters/integer-uint8/encoder.js +40 -0
  61. package/dist/src/codecgenerators/basecodecemitters/number/decoder.js +26 -0
  62. package/dist/src/codecgenerators/basecodecemitters/number/encoder.js +38 -0
  63. package/dist/src/codecgenerators/basecodecemitters/shared/comments.js +13 -0
  64. package/dist/src/codecgenerators/basecodecemitters/shared/contracts.js +2 -0
  65. package/dist/src/codecgenerators/basecodecemitters/shared/fixedwidth.js +53 -0
  66. package/dist/src/codecgenerators/basecodecemitters/shared/index.js +21 -0
  67. package/dist/src/codecgenerators/basecodecemitters/shared/positionalBase93.js +48 -0
  68. package/dist/src/codecgenerators/basecodecemitters/shared/rawbytes.js +30 -0
  69. package/dist/src/codecgenerators/basecodecemitters/string/decoder.js +43 -0
  70. package/dist/src/codecgenerators/basecodecemitters/string/encoder.js +43 -0
  71. package/dist/src/codecgenerators/basecodecemitters/stringArray/decoder.js +80 -0
  72. package/dist/src/codecgenerators/basecodecemitters/stringArray/encoder.js +57 -0
  73. package/dist/src/emit.js +760 -120
  74. package/dist/src/structured-top-level-codecs.js +1305 -0
  75. package/package.json +2 -3
  76. package/spec/AnQst-Spec-DSL.d.ts +15 -8
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint16 — TypeScript decoder (standalone base93 string → number).
4
+ *
5
+ * - Decodes base93 to 2 bytes, then reads signed 16-bit two's complement via Int16Array.
6
+ * - Returns the JavaScript number represented by that qint16 payload.
7
+ * - C++ side performs the same memcpy-based reinterpretation into qint16.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.decoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 2,
14
+ tsViewCtor: "Int16Array",
15
+ cppType: "qint16"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-qint16",
19
+ specPath: "RefinedSpecs/Codecs/Integer_qint16_Codec.md",
20
+ tsType: "number",
21
+ cppType: "qint16",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Decode standalone base93 to 2 bytes, reinterpret them as qint16 / Int16Array[0] and return the resulting number.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const TS_FN = "decodeQint16Standalone";
27
+ const CPP_FN = "decodeQint16Standalone";
28
+ exports.decoderEmitter = {
29
+ descriptor: exports.descriptor,
30
+ emitTsDecoder() {
31
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)(TS_FN, FIXED_WIDTH);
32
+ },
33
+ emitCppDecoder() {
34
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)(CPP_FN, FIXED_WIDTH);
35
+ }
36
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint16 — TypeScript encoder (number → standalone base93 string).
4
+ *
5
+ * - 2-byte signed two's complement via Int16Array; platform-native byte order.
6
+ * - Standalone wire: one base93 string (3 characters for 2 bytes).
7
+ * - C++ side mirrors layout with memcpy into qint16, keeping TS/C++ interop portable.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.encoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 2,
14
+ tsViewCtor: "Int16Array",
15
+ cppType: "qint16"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-qint16",
19
+ specPath: "RefinedSpecs/Codecs/Integer_qint16_Codec.md",
20
+ tsType: "number",
21
+ cppType: "qint16",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Serialize qint16 as 2-byte signed two's complement (Int16Array / C++ memcpy), then base93-encode to a standalone JSON string.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const TS_FN = "encodeQint16Standalone";
27
+ const CPP_FN = "encodeQint16Standalone";
28
+ exports.encoderEmitter = {
29
+ descriptor: exports.descriptor,
30
+ emitTsEncoder() {
31
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)(TS_FN, FIXED_WIDTH);
32
+ },
33
+ emitCppEncoder() {
34
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)(CPP_FN, FIXED_WIDTH);
35
+ }
36
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint32 — TypeScript decoder (standalone base93 string → number).
4
+ *
5
+ * - Decodes base93 to 4 bytes, then reads signed 32-bit two's complement via Int32Array.
6
+ * - Returns the JavaScript number represented by that qint32 payload.
7
+ * - C++ side performs the same 4-byte reinterpretation with memcpy into qint32.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.decoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const encoder_1 = require("./encoder");
13
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
14
+ const FIXED_WIDTH = encoder_1.descriptor.fixedWidth;
15
+ const TS_FN = "decodeQint32Standalone";
16
+ const CPP_FN = "decodeQint32Standalone";
17
+ exports.decoderEmitter = {
18
+ descriptor: encoder_1.descriptor,
19
+ emitTsDecoder() {
20
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)(TS_FN, FIXED_WIDTH);
21
+ },
22
+ emitCppDecoder() {
23
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)(CPP_FN, FIXED_WIDTH);
24
+ }
25
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint32 — TypeScript encoder (number → standalone base93 string).
4
+ *
5
+ * - 4-byte signed two's complement via Int32Array; platform-native byte order.
6
+ * - Standalone wire: one base93 string (5 characters for 4 bytes).
7
+ * - C++ side mirrors the same 4-byte layout with memcpy into qint32.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.encoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 4,
14
+ tsViewCtor: "Int32Array",
15
+ cppType: "qint32"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-qint32",
19
+ specPath: "RefinedSpecs/Codecs/Integer_qint32_Codec.md",
20
+ tsType: "number",
21
+ cppType: "qint32",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Serialize qint32 as 4-byte signed two's complement (Int32Array / C++ memcpy), then base93-encode to a standalone 5-character JSON string.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const TS_FN = "encodeQint32Standalone";
27
+ const CPP_FN = "encodeQint32Standalone";
28
+ exports.encoderEmitter = {
29
+ descriptor: exports.descriptor,
30
+ emitTsEncoder() {
31
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)(TS_FN, FIXED_WIDTH);
32
+ },
33
+ emitCppEncoder() {
34
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)(CPP_FN, FIXED_WIDTH);
35
+ }
36
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint8 — TypeScript decoder (standalone base93 string → number).
4
+ *
5
+ * - Decodes base93 to 1 byte, then reads signed 8-bit two's complement via Int8Array.
6
+ * - Returns the JavaScript number represented by that single signed byte.
7
+ * - C++ side performs the same single-byte reinterpretation, which is portable for qint8.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.decoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 1,
14
+ tsViewCtor: "Int8Array",
15
+ cppType: "qint8"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-qint8",
19
+ specPath: "RefinedSpecs/Codecs/Integer_qint8_Codec.md",
20
+ tsType: "number",
21
+ cppType: "qint8",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Decode standalone base93 to 1 byte, reinterpret it as qint8 / Int8Array[0] and return the resulting number.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const TS_FN = "decodeQint8Standalone";
27
+ const CPP_FN = "decodeQint8Standalone";
28
+ exports.decoderEmitter = {
29
+ descriptor: exports.descriptor,
30
+ emitTsDecoder() {
31
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)(TS_FN, FIXED_WIDTH);
32
+ },
33
+ emitCppDecoder() {
34
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)(CPP_FN, FIXED_WIDTH);
35
+ }
36
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter: AnQst.Type.qint8 — TypeScript encoder (number → standalone base93 string).
4
+ *
5
+ * - 1-byte signed two's complement via Int8Array; no runtime range/type validation.
6
+ * - Standalone wire: one base93 string (2 characters for 1 byte).
7
+ * - C++ side mirrors the same single-byte layout, so interoperability is portable.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.encoderEmitter = exports.descriptor = void 0;
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 1,
14
+ tsViewCtor: "Int8Array",
15
+ cppType: "qint8"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-qint8",
19
+ specPath: "RefinedSpecs/Codecs/Integer_qint8_Codec.md",
20
+ tsType: "number",
21
+ cppType: "qint8",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Serialize qint8 as 1-byte signed two's complement (Int8Array / single C++ byte), then base93-encode to a standalone JSON string.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const TS_FN = "encodeQint8Standalone";
27
+ const CPP_FN = "encodeQint8Standalone";
28
+ exports.encoderEmitter = {
29
+ descriptor: exports.descriptor,
30
+ emitTsEncoder() {
31
+ return (0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)(TS_FN, FIXED_WIDTH);
32
+ },
33
+ emitCppEncoder() {
34
+ return (0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)(CPP_FN, FIXED_WIDTH);
35
+ }
36
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob → TypeScript `number`, C++ `quint16`.
4
+ * Reconstructs the platform-native 2-byte unsigned scalar from a 3-character base93 payload.
5
+ * See RefinedSpecs/Codecs/Integer_quint16_Codec.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.decoderEmitter = exports.descriptor = void 0;
9
+ const comments_1 = require("../shared/comments");
10
+ const fixedwidth_1 = require("../shared/fixedwidth");
11
+ const encoder_1 = require("./encoder");
12
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
13
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.quint16 / quint16", [
14
+ "Decodes base93 to exactly 2 bytes, then reads Uint16Array[0] in TypeScript or quint16 in C++.",
15
+ "Standalone payloads are fixed-width and therefore always 3 base93 characters for valid quint16 values.",
16
+ "Portable interoperability is byte-exact because both sides reinterpret the same 2 decoded bytes as quint16."
17
+ ]);
18
+ exports.decoderEmitter = {
19
+ descriptor: encoder_1.descriptor,
20
+ emitTsDecoder() {
21
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeQuint16Standalone", encoder_1.descriptor.fixedWidth)}`;
22
+ },
23
+ emitCppDecoder() {
24
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeQuint16Standalone", encoder_1.descriptor.fixedWidth)}`;
25
+ }
26
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): AnQst.Type.quint16 ↔ TypeScript `number`, C++ `quint16`.
4
+ * Standalone wire shape is one 3-character base93 string carrying exactly 2 raw bytes.
5
+ * See RefinedSpecs/Codecs/Integer_quint16_Codec.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.encoderEmitter = exports.descriptor = void 0;
9
+ const comments_1 = require("../shared/comments");
10
+ const fixedwidth_1 = require("../shared/fixedwidth");
11
+ const FIXED_WIDTH = {
12
+ byteWidth: 2,
13
+ tsViewCtor: "Uint16Array",
14
+ cppType: "quint16"
15
+ };
16
+ exports.descriptor = {
17
+ codecId: "integer-quint16",
18
+ specPath: "RefinedSpecs/Codecs/Integer_quint16_Codec.md",
19
+ tsType: "number",
20
+ cppType: "quint16",
21
+ wireCategory: "fixed-width-scalar",
22
+ strategySummary: "Unsigned 16-bit scalar: write the platform-native 2-byte Uint16Array/quint16 representation, then base93-encode it to a 3-character standalone string.",
23
+ fixedWidth: FIXED_WIDTH
24
+ };
25
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.quint16 / quint16", [
26
+ "Uses Uint16Array[0] so TypeScript follows the quint16 prose for the host-native 2-byte unsigned representation.",
27
+ "Emits exactly 3 base93 characters for the standalone wire payload because 2 raw bytes are encoded directly.",
28
+ "C++ encoder memcpy-copies the same 2 bytes from quint16, preserving portable interop at the byte level."
29
+ ]);
30
+ exports.encoderEmitter = {
31
+ descriptor: exports.descriptor,
32
+ emitTsEncoder() {
33
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeQuint16Standalone", FIXED_WIDTH)}`;
34
+ },
35
+ emitCppEncoder() {
36
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeQuint16Standalone", FIXED_WIDTH)}`;
37
+ }
38
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob → TypeScript `number`, C++ `quint32`.
4
+ * Reconstructs the 4-byte unsigned payload from a 5-character base93 string and
5
+ * reads it back through Uint32Array / quint32 in host-native byte order.
6
+ * See RefinedSpecs/Codecs/Integer_quint32_Codec.md.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.decoderEmitter = exports.descriptor = void 0;
10
+ const comments_1 = require("../shared/comments");
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const encoder_1 = require("./encoder");
13
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
14
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.quint32 / quint32", [
15
+ "Decodes base93 to 4 bytes, then reads Uint32Array[0] in TypeScript or quint32 in C++.",
16
+ "Standalone payloads are fixed-width and therefore always 5 base93 characters for valid quint32 values.",
17
+ "Portable interoperability is direct because both sides reinterpret the same 4 decoded bytes."
18
+ ]);
19
+ exports.decoderEmitter = {
20
+ descriptor: encoder_1.descriptor,
21
+ emitTsDecoder() {
22
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeQuint32Standalone", encoder_1.descriptor.fixedWidth)}`;
23
+ },
24
+ emitCppDecoder() {
25
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeQuint32Standalone", encoder_1.descriptor.fixedWidth)}`;
26
+ }
27
+ };
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): AnQst.Type.quint32 ↔ TypeScript `number`, C++ `quint32`.
4
+ * Standalone wire shape is one 5-character base93 string carrying exactly 4 bytes
5
+ * from a Uint32Array host-native unsigned 32-bit representation.
6
+ * See RefinedSpecs/Codecs/Integer_quint32_Codec.md.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.encoderEmitter = exports.descriptor = void 0;
10
+ const comments_1 = require("../shared/comments");
11
+ const fixedwidth_1 = require("../shared/fixedwidth");
12
+ const FIXED_WIDTH = {
13
+ byteWidth: 4,
14
+ tsViewCtor: "Uint32Array",
15
+ cppType: "quint32"
16
+ };
17
+ exports.descriptor = {
18
+ codecId: "integer-quint32",
19
+ specPath: "RefinedSpecs/Codecs/Integer_quint32_Codec.md",
20
+ tsType: "number",
21
+ cppType: "quint32",
22
+ wireCategory: "fixed-width-scalar",
23
+ strategySummary: "Unsigned 32-bit scalar: materialize 4 host-native bytes via Uint32Array/quint32, then base93-encode them to a standalone 5-character string.",
24
+ fixedWidth: FIXED_WIDTH
25
+ };
26
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.quint32 / quint32", [
27
+ "Uses Uint32Array[0] so TypeScript follows the quint32 prose for 4-byte unsigned materialization.",
28
+ "Emits exactly 5 base93 characters for the standalone wire payload.",
29
+ "C++ encoder memcpy-copies the quint32 bytes, matching the TypeScript wire byte-for-byte on the same host."
30
+ ]);
31
+ exports.encoderEmitter = {
32
+ descriptor: exports.descriptor,
33
+ emitTsEncoder() {
34
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeQuint32Standalone", FIXED_WIDTH)}`;
35
+ },
36
+ emitCppEncoder() {
37
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeQuint32Standalone", FIXED_WIDTH)}`;
38
+ }
39
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob → TypeScript `number`, C++ `quint8`.
4
+ * Reconstructs the single unsigned byte from a 2-character base93 payload.
5
+ * See RefinedSpecs/Codecs/Integer_quint8_Codec.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.decoderEmitter = exports.descriptor = void 0;
9
+ const comments_1 = require("../shared/comments");
10
+ const fixedwidth_1 = require("../shared/fixedwidth");
11
+ const encoder_1 = require("./encoder");
12
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
13
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.quint8 / quint8", [
14
+ "Decodes base93 to one byte, then reads Uint8Array[0] in TypeScript or quint8 in C++.",
15
+ "Standalone payloads are fixed-width and therefore always 2 base93 characters for valid quint8 values.",
16
+ "Portable interoperability is direct because the byte itself is already the decoded unsigned 8-bit value."
17
+ ]);
18
+ exports.decoderEmitter = {
19
+ descriptor: encoder_1.descriptor,
20
+ emitTsDecoder() {
21
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeQuint8Standalone", encoder_1.descriptor.fixedWidth)}`;
22
+ },
23
+ emitCppDecoder() {
24
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeQuint8Standalone", encoder_1.descriptor.fixedWidth)}`;
25
+ }
26
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): AnQst.Type.quint8 ↔ TypeScript `number`, C++ `quint8`.
4
+ * Standalone wire shape is one 2-character base93 string carrying exactly 1 byte.
5
+ * See RefinedSpecs/Codecs/Integer_quint8_Codec.md.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.encoderEmitter = exports.descriptor = void 0;
9
+ const comments_1 = require("../shared/comments");
10
+ const fixedwidth_1 = require("../shared/fixedwidth");
11
+ const FIXED_WIDTH = {
12
+ byteWidth: 1,
13
+ tsViewCtor: "Uint8Array",
14
+ cppType: "quint8"
15
+ };
16
+ exports.descriptor = {
17
+ codecId: "integer-quint8",
18
+ specPath: "RefinedSpecs/Codecs/Integer_quint8_Codec.md",
19
+ tsType: "number",
20
+ cppType: "quint8",
21
+ wireCategory: "fixed-width-scalar",
22
+ strategySummary: "Unsigned 8-bit scalar: write the low 8 bits via Uint8Array/quint8, then base93-encode the single byte to a 2-character standalone string.",
23
+ fixedWidth: FIXED_WIDTH
24
+ };
25
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.quint8 / quint8", [
26
+ "Uses Uint8Array[0] so TypeScript follows the quint8 prose for 1-byte unsigned truncation/wrapping.",
27
+ "Emits exactly 2 base93 characters for the standalone wire payload.",
28
+ "C++ encoder memcpy-copies the single quint8 byte, matching the TypeScript wire byte-for-byte."
29
+ ]);
30
+ exports.encoderEmitter = {
31
+ descriptor: exports.descriptor,
32
+ emitTsEncoder() {
33
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeQuint8Standalone", FIXED_WIDTH)}`;
34
+ },
35
+ emitCppEncoder() {
36
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeQuint8Standalone", FIXED_WIDTH)}`;
37
+ }
38
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob -> TypeScript `number`, C++ `uint16_t`.
4
+ *
5
+ * This reverses the standalone `uint16` encoder by decoding 3 base93 characters
6
+ * to 2 bytes and reading them through `Uint16Array` / `uint16_t`. The wire
7
+ * contract is intentionally identical to `quint16`, while descriptor identity
8
+ * remains distinct for downstream code generation and C++ type selection.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.decoderEmitter = exports.descriptor = void 0;
12
+ const comments_1 = require("../shared/comments");
13
+ const fixedwidth_1 = require("../shared/fixedwidth");
14
+ const encoder_1 = require("./encoder");
15
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
16
+ const fixedWidth = encoder_1.descriptor.fixedWidth;
17
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.uint16 / uint16_t", [
18
+ "Base93-decodes the standalone payload to 2 bytes, then reads them through Uint16Array or uint16_t.",
19
+ "Returns the JavaScript number represented by the unsigned 16-bit host-endian byte pair.",
20
+ "Accepts the same 3-character wires as quint16 because the byte-level wire format is deliberately identical."
21
+ ]);
22
+ exports.decoderEmitter = {
23
+ descriptor: encoder_1.descriptor,
24
+ emitTsDecoder() {
25
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeUint16Standalone", fixedWidth)}`;
26
+ },
27
+ emitCppDecoder() {
28
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeUint16Standalone", fixedWidth)}`;
29
+ }
30
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): `AnQst.Type.uint16` -> TypeScript `number`, C++ `uint16_t`.
4
+ *
5
+ * This codec is wire-identical to `AnQst.Type.quint16`: a fixed-width unsigned
6
+ * 16-bit scalar written through `Uint16Array`, preserving the platform-native
7
+ * 2-byte layout before base93-encoding it to a 3-character standalone string.
8
+ * The distinction is preserved only in descriptor metadata and emitted C++
9
+ * mapping (`uint16_t` instead of `quint16`).
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.encoderEmitter = exports.descriptor = void 0;
13
+ const comments_1 = require("../shared/comments");
14
+ const fixedwidth_1 = require("../shared/fixedwidth");
15
+ const fixedWidth = {
16
+ byteWidth: 2,
17
+ tsViewCtor: "Uint16Array",
18
+ cppType: "uint16_t"
19
+ };
20
+ exports.descriptor = {
21
+ codecId: "AnQst.Type.uint16",
22
+ specPath: "RefinedSpecs/Codecs/Integer_uint16_Codec.md",
23
+ tsType: "number",
24
+ cppType: "uint16_t",
25
+ wireCategory: "fixed-width-scalar",
26
+ strategySummary: "Wire-identical to quint16: 2-byte unsigned scalar via Uint16Array / memcpy into uint16_t, base93-encoded as a 3-character standalone string.",
27
+ fixedWidth
28
+ };
29
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.uint16 / uint16_t", [
30
+ "Uses Uint16Array so TypeScript follows the uint16/quint16 prose for unsigned 16-bit host-endian bytes.",
31
+ "Emits exactly 3 base93 characters because the standalone payload is always 2 bytes wide.",
32
+ "C++ encoder memcpy-copies uint16_t into the same 2-byte payload, keeping the wire identical to quint16."
33
+ ]);
34
+ exports.encoderEmitter = {
35
+ descriptor: exports.descriptor,
36
+ emitTsEncoder() {
37
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeUint16Standalone", fixedWidth)}`;
38
+ },
39
+ emitCppEncoder() {
40
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeUint16Standalone", fixedWidth)}`;
41
+ }
42
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob -> TypeScript `number`, C++ `uint32_t`.
4
+ *
5
+ * This reverses the standalone `uint32` encoder by decoding 5 base93 characters
6
+ * to 4 bytes and reading them through `Uint32Array` / `uint32_t`. The wire
7
+ * contract is intentionally identical to `quint32`, while descriptor identity
8
+ * remains distinct for downstream code generation and C++ type selection.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.decoder = exports.decoderEmitter = exports.descriptor = void 0;
12
+ const comments_1 = require("../shared/comments");
13
+ const fixedwidth_1 = require("../shared/fixedwidth");
14
+ const encoder_1 = require("./encoder");
15
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
16
+ const fixedWidth = encoder_1.descriptor.fixedWidth;
17
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.uint32 / uint32_t", [
18
+ "Base93-decodes the standalone payload to 4 bytes, then reads them through Uint32Array or uint32_t.",
19
+ "Returns the JavaScript number represented by the unsigned 32-bit host-endian byte sequence.",
20
+ "Accepts the same 5-character wires as quint32 because the byte-level wire format is deliberately identical."
21
+ ]);
22
+ exports.decoderEmitter = {
23
+ descriptor: encoder_1.descriptor,
24
+ emitTsDecoder() {
25
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeUint32Standalone", fixedWidth)}`;
26
+ },
27
+ emitCppDecoder() {
28
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeUint32Standalone", fixedWidth)}`;
29
+ }
30
+ };
31
+ exports.decoder = exports.decoderEmitter;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): `AnQst.Type.uint32` -> TypeScript `number`, C++ `uint32_t`.
4
+ *
5
+ * This codec is wire-identical to `AnQst.Type.quint32`: a fixed-width unsigned
6
+ * 32-bit scalar written through `Uint32Array`, preserving the platform-native
7
+ * 4-byte layout before base93-encoding it to a 5-character standalone string.
8
+ * The distinction is preserved only in descriptor metadata and emitted C++
9
+ * mapping (`uint32_t` instead of `quint32`).
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.encoder = exports.encoderEmitter = exports.descriptor = void 0;
13
+ const comments_1 = require("../shared/comments");
14
+ const fixedwidth_1 = require("../shared/fixedwidth");
15
+ const fixedWidth = {
16
+ byteWidth: 4,
17
+ tsViewCtor: "Uint32Array",
18
+ cppType: "uint32_t"
19
+ };
20
+ exports.descriptor = {
21
+ codecId: "AnQst.Type.uint32",
22
+ specPath: "RefinedSpecs/Codecs/Integer_uint32_Codec.md",
23
+ tsType: "number",
24
+ cppType: "uint32_t",
25
+ wireCategory: "fixed-width-scalar",
26
+ strategySummary: "Wire-identical to quint32: 4-byte unsigned scalar via Uint32Array / memcpy into uint32_t, base93-encoded as a 5-character standalone string.",
27
+ fixedWidth
28
+ };
29
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.uint32 / uint32_t", [
30
+ "Uses Uint32Array so TypeScript follows the uint32/quint32 prose for unsigned 32-bit host-endian bytes.",
31
+ "Emits exactly 5 base93 characters because the standalone payload is always 4 bytes wide.",
32
+ "C++ encoder memcpy-copies uint32_t into the same 4-byte payload, keeping the wire identical to quint32."
33
+ ]);
34
+ exports.encoderEmitter = {
35
+ descriptor: exports.descriptor,
36
+ emitTsEncoder() {
37
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeUint32Standalone", fixedWidth)}`;
38
+ },
39
+ emitCppEncoder() {
40
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeUint32Standalone", fixedWidth)}`;
41
+ }
42
+ };
43
+ exports.encoder = exports.encoderEmitter;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (decode): base93 blob -> TypeScript `number`, C++ `uint8_t`.
4
+ *
5
+ * This reverses the standalone `uint8` encoder by decoding 2 base93 characters
6
+ * to one byte and reading that byte through `Uint8Array` / `uint8_t`. The wire
7
+ * contract is identical to `quint8`, while the descriptor keeps the `uint8_t`
8
+ * identity for downstream code generation.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.decoder = exports.descriptor = void 0;
12
+ const comments_1 = require("../shared/comments");
13
+ const fixedwidth_1 = require("../shared/fixedwidth");
14
+ const encoder_1 = require("./encoder");
15
+ Object.defineProperty(exports, "descriptor", { enumerable: true, get: function () { return encoder_1.descriptor; } });
16
+ const fixedWidth = encoder_1.descriptor.fixedWidth;
17
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (decode): AnQst.Type.uint8 / uint8_t", [
18
+ "Base93-decodes the standalone payload to one byte, then reads it through Uint8Array or uint8_t.",
19
+ "Returns a JS number in the unsigned 0-255 domain described by the uint8 spec.",
20
+ "Accepts the same 2-character wire strings as quint8 because the wire format is intentionally identical."
21
+ ]);
22
+ exports.decoder = {
23
+ descriptor: encoder_1.descriptor,
24
+ emitTsDecoder() {
25
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneDecoder)("decodeUint8Standalone", fixedWidth)}`;
26
+ },
27
+ emitCppDecoder() {
28
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneDecoder)("decodeUint8Standalone", fixedWidth)}`;
29
+ }
30
+ };
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /**
3
+ * Base codec emitter (encode): `AnQst.Type.uint8` -> TypeScript `number`, C++ `uint8_t`.
4
+ *
5
+ * This codec is wire-identical to `AnQst.Type.quint8`: a single unsigned byte
6
+ * encoded as a 2-character base93 string. The distinction is preserved only in
7
+ * descriptor metadata and the emitted C++ type mapping (`uint8_t` vs `quint8`).
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.encoder = exports.descriptor = void 0;
11
+ const comments_1 = require("../shared/comments");
12
+ const fixedwidth_1 = require("../shared/fixedwidth");
13
+ const fixedWidth = {
14
+ byteWidth: 1,
15
+ tsViewCtor: "Uint8Array",
16
+ cppType: "uint8_t"
17
+ };
18
+ exports.descriptor = {
19
+ codecId: "AnQst.Type.uint8",
20
+ specPath: "RefinedSpecs/Codecs/Integer_uint8_Codec.md",
21
+ tsType: "number",
22
+ cppType: "uint8_t",
23
+ wireCategory: "fixed-width-scalar",
24
+ strategySummary: "Single unsigned byte via Uint8Array / memcpy into uint8_t, base93 standalone string (2 chars); wire-identical to quint8 but descriptor/C++ mapping remain distinct.",
25
+ fixedWidth
26
+ };
27
+ const strategyComment = (0, comments_1.emitStrategyComment)("Base codec emitter (encode): AnQst.Type.uint8 / uint8_t", [
28
+ "Uses Uint8Array for the 1-byte unsigned representation on the TS side.",
29
+ "Uses std::memcpy into uint8_t on the C++ side for the same single-byte payload.",
30
+ "Produces the same 2-character base93 wire form as quint8; only descriptor and C++ typedef mapping differ."
31
+ ]);
32
+ exports.encoder = {
33
+ descriptor: exports.descriptor,
34
+ emitTsEncoder() {
35
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitTsFixedWidthStandaloneEncoder)("encodeUint8Standalone", fixedWidth)}`;
36
+ },
37
+ emitCppEncoder() {
38
+ return `${strategyComment}\n\n${(0, fixedwidth_1.emitCppFixedWidthStandaloneEncoder)("encodeUint8Standalone", fixedWidth)}`;
39
+ }
40
+ };