@oazmi/superbuild 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/esm/_dnt.shims.d.ts +2 -0
  2. package/esm/_dnt.shims.d.ts.map +1 -0
  3. package/esm/_dnt.shims.js +57 -0
  4. package/esm/deps/jsr.io/@oazmi/esbuild-types/0.28.0/src/mod.d.ts +598 -0
  5. package/esm/deps/jsr.io/@oazmi/esbuild-types/0.28.0/src/mod.d.ts.map +1 -0
  6. package/esm/deps/jsr.io/@oazmi/esbuild-types/0.28.0/src/mod.js +1 -0
  7. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/alias.d.ts +617 -0
  8. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/alias.d.ts.map +1 -0
  9. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/alias.js +671 -0
  10. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array1d.d.ts +487 -0
  11. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array1d.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array1d.js +536 -0
  13. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array2d.d.ts +266 -0
  14. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array2d.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/array2d.js +318 -0
  16. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/binder.d.ts +368 -0
  17. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/binder.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/binder.js +380 -0
  19. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/crossenv.d.ts +711 -0
  20. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/crossenv.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/crossenv.js +1173 -0
  22. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/cryptoman.d.ts +171 -0
  23. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/cryptoman.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/cryptoman.js +308 -0
  25. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/deps.d.ts +10 -0
  26. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/deps.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/deps.js +10 -0
  28. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack.d.ts +168 -0
  29. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack.js +236 -0
  31. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack_varint.d.ts +90 -0
  32. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack_varint.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack_varint.js +237 -0
  34. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericarray.d.ts +213 -0
  35. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericarray.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericarray.js +363 -0
  37. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericmethods.d.ts +233 -0
  38. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericmethods.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/numericmethods.js +256 -0
  40. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/pathman.d.ts +1436 -0
  41. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/pathman.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/pathman.js +1730 -0
  43. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/promiseman.d.ts +647 -0
  44. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/promiseman.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/promiseman.js +762 -0
  46. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/stringman.d.ts +538 -0
  47. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/stringman.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/stringman.js +626 -0
  49. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/struct.d.ts +734 -0
  50. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/struct.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/struct.js +764 -0
  52. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedbuffer.d.ts +137 -0
  53. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedbuffer.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedbuffer.js +234 -0
  55. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedefs.d.ts +391 -0
  56. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedefs.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/typedefs.js +8 -0
  58. package/esm/deps.d.ts +56 -0
  59. package/esm/deps.d.ts.map +1 -0
  60. package/esm/deps.js +37 -0
  61. package/esm/esbuild/metafile.d.ts +90 -0
  62. package/esm/esbuild/metafile.d.ts.map +1 -0
  63. package/esm/esbuild/metafile.js +275 -0
  64. package/esm/esbuild/native.d.ts +95 -0
  65. package/esm/esbuild/native.d.ts.map +1 -0
  66. package/esm/esbuild/native.js +127 -0
  67. package/esm/esbuild/outputfile.d.ts +86 -0
  68. package/esm/esbuild/outputfile.d.ts.map +1 -0
  69. package/esm/esbuild/outputfile.js +221 -0
  70. package/esm/esbuild/strongtypes.d.ts +90 -0
  71. package/esm/esbuild/strongtypes.d.ts.map +1 -0
  72. package/esm/esbuild/strongtypes.js +8 -0
  73. package/esm/esbuild/typedefs.d.ts +121 -0
  74. package/esm/esbuild/typedefs.d.ts.map +1 -0
  75. package/esm/esbuild/typedefs.js +55 -0
  76. package/esm/esbuild/weaktypes.d.ts +46 -0
  77. package/esm/esbuild/weaktypes.d.ts.map +1 -0
  78. package/esm/esbuild/weaktypes.js +8 -0
  79. package/esm/funcdefs.d.ts +89 -0
  80. package/esm/funcdefs.d.ts.map +1 -0
  81. package/esm/funcdefs.js +145 -0
  82. package/esm/mod.d.ts +4 -0
  83. package/esm/mod.d.ts.map +1 -0
  84. package/esm/mod.js +2 -0
  85. package/esm/package.json +3 -0
  86. package/esm/plugins/emissions_driver.d.ts +33 -0
  87. package/esm/plugins/emissions_driver.d.ts.map +1 -0
  88. package/esm/plugins/emissions_driver.js +260 -0
  89. package/esm/plugins/long_build.d.ts +138 -0
  90. package/esm/plugins/long_build.d.ts.map +1 -0
  91. package/esm/plugins/long_build.js +288 -0
  92. package/esm/plugins/native_replica.d.ts +48 -0
  93. package/esm/plugins/native_replica.d.ts.map +1 -0
  94. package/esm/plugins/native_replica.js +122 -0
  95. package/esm/super/build.d.ts +53 -0
  96. package/esm/super/build.d.ts.map +1 -0
  97. package/esm/super/build.js +39 -0
  98. package/esm/super/build_context.d.ts +83 -0
  99. package/esm/super/build_context.d.ts.map +1 -0
  100. package/esm/super/build_context.js +124 -0
  101. package/esm/super/mod.d.ts +12 -0
  102. package/esm/super/mod.d.ts.map +1 -0
  103. package/esm/super/mod.js +9 -0
  104. package/esm/super/plugin.d.ts +23 -0
  105. package/esm/super/plugin.d.ts.map +1 -0
  106. package/esm/super/plugin.js +31 -0
  107. package/esm/super/plugin_build.d.ts +38 -0
  108. package/esm/super/plugin_build.d.ts.map +1 -0
  109. package/esm/super/plugin_build.js +198 -0
  110. package/esm/super/typedefs.d.ts +323 -0
  111. package/esm/super/typedefs.d.ts.map +1 -0
  112. package/esm/super/typedefs.js +10 -0
  113. package/esm/typedefs.d.ts +21 -0
  114. package/esm/typedefs.d.ts.map +1 -0
  115. package/esm/typedefs.js +5 -0
  116. package/license.md +37 -0
  117. package/package.json +88 -0
  118. package/readme.md +181 -0
@@ -0,0 +1,168 @@
1
+ /** utility functions for packing and unpacking bytes (8-bits) of primitive javascript objects.
2
+ * > and hence the name of the module (*8(bit)pack*).
3
+ *
4
+ * @module
5
+ */
6
+ import type { NumericArrayType, NumericType, VarNumericArrayType, VarNumericType } from "./typedefs.js";
7
+ /** binary primitive types.
8
+ * - {@link NumericType} various binary representations of number
9
+ * - {@link NumericArrayType} various binary representations of array of numbers. requires defining array length (number of items) during decoding as `args[0]`
10
+ * - `"bytes"` a `Uint8Array`, which requires defining a bytesize length during decoding as `args[0]`
11
+ * - `"str"` a string, which requires defining a bytesize length during decoding as `args[0]`
12
+ * - `"cstr"` a null-terminated (`"\u0000"`) string. the null termination byte character is automatically added when encoding
13
+ * - `"bool"` a boolean occupying a single byte
14
+ */
15
+ export type PrimitiveType = PrimitiveArrayType | NumericType | VarNumericType | "cstr" | "bool";
16
+ /** primitive types that typically require length information to be decoded. */
17
+ export type PrimitiveArrayType = NumericArrayType | VarNumericArrayType | "bytes" | "str";
18
+ /** all unpack functions return their decoded outputs in a 2-tuple array;
19
+ * the first element being the decoded value `V`, and the second being the number of bytes this data occupied.
20
+ */
21
+ export type Decoded<V, ByteSize extends number = number> = [value: V, bytesize: ByteSize];
22
+ /** primitive javascript types. */
23
+ export type JSPrimitive = string | boolean | number | bigint | number[] | Uint8Array;
24
+ /** packing function signature for {@link JSPrimitive} types. */
25
+ export type EncodeFunc<T extends JSPrimitive, ARGS extends any[] = []> = (value: T, ...args: ARGS) => Uint8Array;
26
+ /** unpacking function signature for {@link JSPrimitive} types. */
27
+ export type DecodeFunc<T extends JSPrimitive, ARGS extends any[] = []> = (buffer: Uint8Array, offset: number, ...args: ARGS) => Decoded<T>;
28
+ /** an instance of `TextEncoder`. (i.e. `new TextEncoder()`, that uses `utf8` encoding). */
29
+ export declare const textEncoder: TextEncoder;
30
+ /** an instance of `TextDecoder`. (i.e. `new TextDecoder()`, that uses `utf8` encoding). */
31
+ export declare const textDecoder: TextDecoder;
32
+ /** read `type` of value from buffer `buf`, starting at position `offset`. */
33
+ export declare const readFrom: (buf: Uint8Array, offset: number, type: PrimitiveType, ...args: any[]) => [value: JSPrimitive, new_offset: number];
34
+ /** write `type` of `value` to buffer `buf`, starting at position `offset`. */
35
+ export declare const writeTo: (buf: Uint8Array, offset: number, type: PrimitiveType, value: JSPrimitive, ...args: any[]) => [buf: typeof buf, new_offset: number];
36
+ /** encode a sequential array of primitive items.
37
+ * to invert/decode the transformation, use {@link unpackSeq}.
38
+ *
39
+ * under the hood, this function uses {@link pack} for encoding each item.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { assertEquals } from "jsr:@std/assert"
44
+ *
45
+ * assertEquals(
46
+ * packSeq(["u4b", 0x12AB98], ["str", "hello"], ["bool", false]),
47
+ * Uint8Array.of(0x00, 0x12, 0xAB, 0x98, 104, 101, 108, 108, 111, 0),
48
+ * )
49
+ * ```
50
+ */
51
+ export declare const packSeq: (...items: Parameters<typeof pack>[]) => any;
52
+ /** decodes as a sequential array of items, provided that you pair the values with their `PrimitiveType`s.
53
+ * this is the inverse of {@link packSeq}.
54
+ *
55
+ * under the hood, this function uses {@link unpack} for decoding each item.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * import { assertEquals } from "jsr:@std/assert"
60
+ *
61
+ * assertEquals(
62
+ * unpackSeq(
63
+ * Uint8Array.of(0x00, 0x12, 0xAB, 0x98, 104, 101, 108, 108, 111, 0), // byte buffer
64
+ * 0, // starting index
65
+ * ["u4b"], // first decoded item should be a 4-byte unsigned integer in big-endian byte-order.
66
+ * ["str", 5], // the second item should be a string consisting of 5 bytes (5 characters in this case).
67
+ * ["bool"], // the last item should be a 1-byte boolean.
68
+ * ), [
69
+ * [0x12AB98, "hello", false], // decoded items
70
+ * 10, // bytes decoded
71
+ * ],
72
+ * )
73
+ * ```
74
+ */
75
+ export declare const unpackSeq: (buf: Uint8Array, offset: number, ...items: [type: PrimitiveType, ...args: any[]][]) => Decoded<JSPrimitive[]>;
76
+ /** a primitive value encoder/packer for a given `type` (see {@link PrimitiveType}).
77
+ * to invert/decode the transformation, use {@link unpack}.
78
+ *
79
+ * under the hood, this function calls one of the following primitive value encoders, based on the `type` that you provide:
80
+ * - {@link encode_bool}, {@link encode_cstr}, {@link encode_str}, {@link encode_bytes},
81
+ * {@link encode_number}, {@link encode_number_array}, {@link encode_varint}, {@link encode_varint_array}
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * import { assertEquals } from "jsr:@std/assert"
86
+ *
87
+ * // aliasing for brevity
88
+ * const u8 = Uint8Array, eq = assertEquals
89
+ *
90
+ * eq(pack("bool" , true), u8.of(1))
91
+ * eq(pack("cstr" , "hello"), u8.of(104, 101, 108, 108, 111, 0))
92
+ * eq(pack("str" , "hello"), u8.of(104, 101, 108, 108, 111))
93
+ * eq(pack("bytes", u8.of(1, 2, 3)), u8.of(1, 2, 3))
94
+ * // NOTE: if your device's native endian is not little-endian, then the test below will fail.
95
+ * eq(pack("f8l[]", [1.1, 2.2, 3**45.67]), new u8(Float64Array.of(1.1, 2.2, 3**45.67).buffer))
96
+ * ```
97
+ */
98
+ export declare const pack: (type: PrimitiveType, value: JSPrimitive, ...args: any[]) => ReturnType<EncodeFunc<JSPrimitive>>;
99
+ /** a buffer decoder/unpacker for a primitive value of a certain `type` (see {@link PrimitiveType}).
100
+ * this is the inverse of {@link pack}.
101
+ *
102
+ * under the hood, this function calls one of the following primitive value decoders, based on the `type` that you provide:
103
+ * - {@link decode_bool}, {@link decode_cstr}, {@link decode_str}, {@link decode_bytes},
104
+ * {@link decode_number}, {@link decode_number_array}, {@link decode_varint}, {@link decode_varint_array}
105
+ *
106
+ * @example
107
+ * ```ts
108
+ * import { assertEquals } from "jsr:@std/assert"
109
+ *
110
+ * // aliasing for brevity
111
+ * const u8 = Uint8Array, eq = assertEquals
112
+ *
113
+ * eq(unpack(
114
+ * "bool", // type of value to decode
115
+ * u8.of(1, 0, 1), // buffer to decode from
116
+ * 1, // the index to begin decoding from
117
+ * ), [
118
+ * false, // returned decoded value
119
+ * 1, // number of bytes traversed while decoding (i.e. byte size of the decoded object)
120
+ * ])
121
+ *
122
+ * eq(unpack("cstr" , u8.of(97, 98, 99, 0, 100, 101), 0), ["abc" , 4])
123
+ * eq(unpack("str" , u8.of(97, 98, 99, 0, 100, 101), 0), ["abc\x00de", 6])
124
+ * eq(unpack("str" , u8.of(97, 98, 99, 0, 100, 101), 0, 4), ["abc\x00" , 4])
125
+ * eq(unpack("bytes", u8.of(0, 1, 2, 3, 4, 5, 6), 2, 4), [u8.of(2, 3, 4, 5), 4])
126
+ * eq(unpack("i2b[]", u8.of(0, 1, 2, 3, 4, 5), 2), [[0x0203, 0x0405] , 4])
127
+ * eq(unpack("i2b[]", u8.of(0, 1, 2, 3, 4, 5), 0, 2), [[0x0001, 0x0203] , 4])
128
+ * ```
129
+ */
130
+ export declare const unpack: (type: PrimitiveType, buf: Uint8Array, offset: number, ...args: any[]) => ReturnType<DecodeFunc<JSPrimitive>>;
131
+ /** pack a `boolean` as 1-byte of data. */
132
+ export declare const encode_bool: EncodeFunc<boolean>;
133
+ /** unpack a `boolean` from 1-byte of data. */
134
+ export declare const decode_bool: DecodeFunc<boolean>;
135
+ /** pack a `string` as an array of characters, terminated by the `"\x00"` (or `"\u0000"`) charbyte.
136
+ * this is the traditional c-programming language convention for strings.
137
+ */
138
+ export declare const encode_cstr: EncodeFunc<string>;
139
+ /** unpack a `string` as an array of characters that's terminated by `"\x00"` (or `"\u0000"`) charbyte.
140
+ * this is the traditional c-programming language convention for strings.
141
+ */
142
+ export declare const decode_cstr: DecodeFunc<string>;
143
+ /** pack a `string` as an array of characters. */
144
+ export declare const encode_str: EncodeFunc<string>;
145
+ /** unpack a `string` as an array of characters.
146
+ * you must provide the `bytesize` of the string being decoded,
147
+ * otherwise the decoder will unpack till the end of the buffer.
148
+ */
149
+ export declare const decode_str: DecodeFunc<string, [bytesize?: number]>;
150
+ /** pack a `Uint8Array` array of bytes as is. (ie: don't perform any operation). */
151
+ export declare const encode_bytes: EncodeFunc<Uint8Array>;
152
+ /** unpack a `Uint8Array` array of bytes.
153
+ * you must provide the `bytesize` of the bytes being decoded,
154
+ * otherwise the decoder will unpack till the end of the buffer.
155
+ */
156
+ export declare const decode_bytes: DecodeFunc<Uint8Array, [bytesize?: number]>;
157
+ /** pack a numeric array (`number[]`) in the provided {@link NumericArrayType} byte representation. */
158
+ export declare const encode_number_array: EncodeFunc<number[], [type: NumericArrayType]>;
159
+ /** unpack a numeric array (`number[]`) that is encoded in one of {@link NumericArrayType} byte representation.
160
+ * you must provide the `array_length` of the array being decoded,
161
+ * otherwise the decoder will unpack till the end of the buffer.
162
+ */
163
+ export declare const decode_number_array: DecodeFunc<number[], [type: NumericArrayType, array_length?: number]>;
164
+ /** pack a `number` in the provided {@link NumericType} byte representation. */
165
+ export declare const encode_number: EncodeFunc<number, [type: NumericType]>;
166
+ /** unpack a `number` in the provided {@link NumericType} byte representation. */
167
+ export declare const decode_number: DecodeFunc<number, [type: NumericType]>;
168
+ //# sourceMappingURL=eightpack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eightpack.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAKF,OAAO,KAAK,EAAE,gB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O,MAAM,UAAU,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAM9D,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,UAAU,CAA+B,CAAA;AAE/E;;;EAGE;AACF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAKpE,CAAA;AAED,sGAAsG;AACtG,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAW9E,CAAA;AAED;;;EAGE;AACF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CAiBrG,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAyF,CAAA;AAE3J,iFAAiF;AACjF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAGjE,CAAA"}
@@ -0,0 +1,236 @@
1
+ /** utility functions for packing and unpacking bytes (8-bits) of primitive javascript objects.
2
+ * > and hence the name of the module (*8(bit)pack*).
3
+ *
4
+ * @module
5
+ */
6
+ import { array_from, number_parseInt } from "./alias.js";
7
+ import { decode_varint, decode_varint_array, encode_varint, encode_varint_array } from "./eightpack_varint.js";
8
+ import { concatBytes, env_is_little_endian, swapEndiannessFast, typed_array_constructor_of } from "./typedbuffer.js";
9
+ /** an instance of `TextEncoder`. (i.e. `new TextEncoder()`, that uses `utf8` encoding). */
10
+ export const textEncoder = /*@__PURE__*/ new TextEncoder();
11
+ /** an instance of `TextDecoder`. (i.e. `new TextDecoder()`, that uses `utf8` encoding). */
12
+ export const textDecoder = /*@__PURE__*/ new TextDecoder();
13
+ /** read `type` of value from buffer `buf`, starting at position `offset`. */
14
+ export const readFrom = (buf, offset, type, ...args) => {
15
+ const [value, bytesize] = unpack(type, buf, offset, ...args);
16
+ return [value, offset + bytesize];
17
+ };
18
+ /** write `type` of `value` to buffer `buf`, starting at position `offset`. */
19
+ export const writeTo = (buf, offset, type, value, ...args) => {
20
+ const value_buf = pack(type, value, ...args);
21
+ buf.set(value_buf, offset);
22
+ return [buf, offset + value_buf.length];
23
+ };
24
+ /** encode a sequential array of primitive items.
25
+ * to invert/decode the transformation, use {@link unpackSeq}.
26
+ *
27
+ * under the hood, this function uses {@link pack} for encoding each item.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { assertEquals } from "jsr:@std/assert"
32
+ *
33
+ * assertEquals(
34
+ * packSeq(["u4b", 0x12AB98], ["str", "hello"], ["bool", false]),
35
+ * Uint8Array.of(0x00, 0x12, 0xAB, 0x98, 104, 101, 108, 108, 111, 0),
36
+ * )
37
+ * ```
38
+ */
39
+ export const packSeq = (...items) => {
40
+ const bufs = [];
41
+ for (const item of items) {
42
+ bufs.push(pack(...item));
43
+ }
44
+ return concatBytes(...bufs);
45
+ };
46
+ /** decodes as a sequential array of items, provided that you pair the values with their `PrimitiveType`s.
47
+ * this is the inverse of {@link packSeq}.
48
+ *
49
+ * under the hood, this function uses {@link unpack} for decoding each item.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * import { assertEquals } from "jsr:@std/assert"
54
+ *
55
+ * assertEquals(
56
+ * unpackSeq(
57
+ * Uint8Array.of(0x00, 0x12, 0xAB, 0x98, 104, 101, 108, 108, 111, 0), // byte buffer
58
+ * 0, // starting index
59
+ * ["u4b"], // first decoded item should be a 4-byte unsigned integer in big-endian byte-order.
60
+ * ["str", 5], // the second item should be a string consisting of 5 bytes (5 characters in this case).
61
+ * ["bool"], // the last item should be a 1-byte boolean.
62
+ * ), [
63
+ * [0x12AB98, "hello", false], // decoded items
64
+ * 10, // bytes decoded
65
+ * ],
66
+ * )
67
+ * ```
68
+ */
69
+ export const unpackSeq = (buf, offset, ...items) => {
70
+ const values = [];
71
+ let total_bytesize = 0;
72
+ for (const [type, ...args] of items) {
73
+ const [value, bytesize] = unpack(type, buf, offset + total_bytesize, ...args);
74
+ values.push(value);
75
+ total_bytesize += bytesize;
76
+ }
77
+ return [values, total_bytesize];
78
+ };
79
+ /** a primitive value encoder/packer for a given `type` (see {@link PrimitiveType}).
80
+ * to invert/decode the transformation, use {@link unpack}.
81
+ *
82
+ * under the hood, this function calls one of the following primitive value encoders, based on the `type` that you provide:
83
+ * - {@link encode_bool}, {@link encode_cstr}, {@link encode_str}, {@link encode_bytes},
84
+ * {@link encode_number}, {@link encode_number_array}, {@link encode_varint}, {@link encode_varint_array}
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * import { assertEquals } from "jsr:@std/assert"
89
+ *
90
+ * // aliasing for brevity
91
+ * const u8 = Uint8Array, eq = assertEquals
92
+ *
93
+ * eq(pack("bool" , true), u8.of(1))
94
+ * eq(pack("cstr" , "hello"), u8.of(104, 101, 108, 108, 111, 0))
95
+ * eq(pack("str" , "hello"), u8.of(104, 101, 108, 108, 111))
96
+ * eq(pack("bytes", u8.of(1, 2, 3)), u8.of(1, 2, 3))
97
+ * // NOTE: if your device's native endian is not little-endian, then the test below will fail.
98
+ * eq(pack("f8l[]", [1.1, 2.2, 3**45.67]), new u8(Float64Array.of(1.1, 2.2, 3**45.67).buffer))
99
+ * ```
100
+ */
101
+ export const pack = (type, value, ...args) => {
102
+ switch (type) {
103
+ case "bool": return encode_bool(value);
104
+ case "cstr": return encode_cstr(value);
105
+ case "str": return encode_str(value);
106
+ case "bytes": return encode_bytes(value);
107
+ default: {
108
+ if (type[1] === "v") {
109
+ return type.endsWith("[]") ?
110
+ encode_varint_array(value, type) :
111
+ encode_varint(value, type);
112
+ }
113
+ else {
114
+ return type.endsWith("[]") ?
115
+ encode_number_array(value, type) :
116
+ encode_number(value, type);
117
+ }
118
+ }
119
+ }
120
+ };
121
+ /** a buffer decoder/unpacker for a primitive value of a certain `type` (see {@link PrimitiveType}).
122
+ * this is the inverse of {@link pack}.
123
+ *
124
+ * under the hood, this function calls one of the following primitive value decoders, based on the `type` that you provide:
125
+ * - {@link decode_bool}, {@link decode_cstr}, {@link decode_str}, {@link decode_bytes},
126
+ * {@link decode_number}, {@link decode_number_array}, {@link decode_varint}, {@link decode_varint_array}
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * import { assertEquals } from "jsr:@std/assert"
131
+ *
132
+ * // aliasing for brevity
133
+ * const u8 = Uint8Array, eq = assertEquals
134
+ *
135
+ * eq(unpack(
136
+ * "bool", // type of value to decode
137
+ * u8.of(1, 0, 1), // buffer to decode from
138
+ * 1, // the index to begin decoding from
139
+ * ), [
140
+ * false, // returned decoded value
141
+ * 1, // number of bytes traversed while decoding (i.e. byte size of the decoded object)
142
+ * ])
143
+ *
144
+ * eq(unpack("cstr" , u8.of(97, 98, 99, 0, 100, 101), 0), ["abc" , 4])
145
+ * eq(unpack("str" , u8.of(97, 98, 99, 0, 100, 101), 0), ["abc\x00de", 6])
146
+ * eq(unpack("str" , u8.of(97, 98, 99, 0, 100, 101), 0, 4), ["abc\x00" , 4])
147
+ * eq(unpack("bytes", u8.of(0, 1, 2, 3, 4, 5, 6), 2, 4), [u8.of(2, 3, 4, 5), 4])
148
+ * eq(unpack("i2b[]", u8.of(0, 1, 2, 3, 4, 5), 2), [[0x0203, 0x0405] , 4])
149
+ * eq(unpack("i2b[]", u8.of(0, 1, 2, 3, 4, 5), 0, 2), [[0x0001, 0x0203] , 4])
150
+ * ```
151
+ */
152
+ export const unpack = (type, buf, offset, ...args) => {
153
+ switch (type) {
154
+ case "bool": return decode_bool(buf, offset);
155
+ case "cstr": return decode_cstr(buf, offset);
156
+ case "str": return decode_str(buf, offset, ...args);
157
+ case "bytes": return decode_bytes(buf, offset, ...args);
158
+ default: {
159
+ if (type[1] === "v") {
160
+ return type.endsWith("[]") ?
161
+ decode_varint_array(buf, offset, type, ...args) :
162
+ decode_varint(buf, offset, type);
163
+ }
164
+ else {
165
+ return type.endsWith("[]") ?
166
+ decode_number_array(buf, offset, type, ...args) :
167
+ decode_number(buf, offset, type);
168
+ }
169
+ }
170
+ }
171
+ };
172
+ /** pack a `boolean` as 1-byte of data. */
173
+ export const encode_bool = (value) => { return Uint8Array.of(value ? 1 : 0); };
174
+ /** unpack a `boolean` from 1-byte of data. */
175
+ export const decode_bool = (buf, offset = 0) => { return [buf[offset] >= 1 ? true : false, 1]; };
176
+ /** pack a `string` as an array of characters, terminated by the `"\x00"` (or `"\u0000"`) charbyte.
177
+ * this is the traditional c-programming language convention for strings.
178
+ */
179
+ export const encode_cstr = (value) => { return textEncoder.encode(value + "\x00"); };
180
+ /** unpack a `string` as an array of characters that's terminated by `"\x00"` (or `"\u0000"`) charbyte.
181
+ * this is the traditional c-programming language convention for strings.
182
+ */
183
+ export const decode_cstr = (buf, offset = 0) => {
184
+ const offset_end = buf.indexOf(0x00, offset), txt_arr = buf.subarray(offset, offset_end), value = textDecoder.decode(txt_arr);
185
+ return [value, txt_arr.length + 1];
186
+ };
187
+ /** pack a `string` as an array of characters. */
188
+ export const encode_str = (value) => { return textEncoder.encode(value); };
189
+ /** unpack a `string` as an array of characters.
190
+ * you must provide the `bytesize` of the string being decoded,
191
+ * otherwise the decoder will unpack till the end of the buffer.
192
+ */
193
+ export const decode_str = (buf, offset = 0, bytesize) => {
194
+ const offset_end = bytesize === undefined ? undefined : offset + bytesize, txt_arr = buf.subarray(offset, offset_end), value = textDecoder.decode(txt_arr);
195
+ return [value, txt_arr.length];
196
+ };
197
+ /** pack a `Uint8Array` array of bytes as is. (ie: don't perform any operation). */
198
+ export const encode_bytes = (value) => { return value; };
199
+ /** unpack a `Uint8Array` array of bytes.
200
+ * you must provide the `bytesize` of the bytes being decoded,
201
+ * otherwise the decoder will unpack till the end of the buffer.
202
+ */
203
+ export const decode_bytes = (buf, offset = 0, bytesize) => {
204
+ const offset_end = bytesize === undefined ? undefined : offset + bytesize, value = buf.slice(offset, offset_end);
205
+ return [value, value.length];
206
+ };
207
+ /** pack a numeric array (`number[]`) in the provided {@link NumericArrayType} byte representation. */
208
+ export const encode_number_array = (value, type) => {
209
+ const [t, s, e] = type, typed_arr_constructor = typed_array_constructor_of(type), bytesize = number_parseInt(s), is_native_endian = (e === "l" && env_is_little_endian) || (e === "b" && !env_is_little_endian) || bytesize === 1 ? true : false, typed_arr = typed_arr_constructor.from(value);
210
+ if (typed_arr instanceof Uint8Array) {
211
+ return typed_arr;
212
+ }
213
+ const buf = new Uint8Array(typed_arr.buffer);
214
+ if (is_native_endian) {
215
+ return buf;
216
+ }
217
+ else
218
+ return swapEndiannessFast(buf, bytesize);
219
+ };
220
+ /** unpack a numeric array (`number[]`) that is encoded in one of {@link NumericArrayType} byte representation.
221
+ * you must provide the `array_length` of the array being decoded,
222
+ * otherwise the decoder will unpack till the end of the buffer.
223
+ */
224
+ export const decode_number_array = (buf, offset = 0, type, array_length) => {
225
+ const [t, s, e] = type, bytesize = number_parseInt(s), is_native_endian = (e === "l" && env_is_little_endian) || (e === "b" && !env_is_little_endian) || bytesize === 1 ? true : false, bytelength = array_length ? bytesize * array_length : undefined, array_buf = buf.subarray(offset, bytelength ? offset + bytelength : undefined), array_bytesize = array_buf.byteLength, typed_arr_constructor = typed_array_constructor_of(type), array_buf_endian_corrected = is_native_endian ? array_buf : swapEndiannessFast(array_buf, bytesize),
226
+ // ANNOYANCE: below, we have to do `as ArrayBuffer` due to the introduction of `SharedArrayBuffer`.
227
+ typed_arr = new typed_arr_constructor(array_buf_endian_corrected.buffer, array_buf_endian_corrected.byteOffset, (array_bytesize / bytesize) | 0);
228
+ return [array_from(typed_arr), array_bytesize];
229
+ };
230
+ /** pack a `number` in the provided {@link NumericType} byte representation. */
231
+ export const encode_number = (value, type) => { return encode_number_array([value,], type); };
232
+ /** unpack a `number` in the provided {@link NumericType} byte representation. */
233
+ export const decode_number = (buf, offset = 0, type) => {
234
+ const [value_arr, bytesize] = decode_number_array(buf, offset, type, 1);
235
+ return [value_arr[0], bytesize];
236
+ };
@@ -0,0 +1,90 @@
1
+ /** submodule for {@link "eightpack"} that adds the ability to encode and decode variable byte-sized integers.
2
+ *
3
+ * this part of the library has been separated from {@link "eightpack"} because of the unlikeyhood of being used.
4
+ *
5
+ * - `uvar` stands for an unsigned variable-sized integer.
6
+ * - `ivar` stands for a signed variable-sized integer.
7
+ *
8
+ * ## Purpose
9
+ *
10
+ * these variable-sized encodings are especially useful for encoding the length of other variables in their header (i.e. at the beginning of their sequence).
11
+ *
12
+ * ## How the encoding works
13
+ *
14
+ * ### Unsigned integer case
15
+ *
16
+ * - the byte form of a `uvar` occupies a variable number of bytes to accommodate the unsigned integer that it is holding.
17
+ * - for each byte, it uses the first bit of the octet (`0bXYYYYYYY`) to signal whether the integer carries on to the next byte (X == 1) or not (X == 0).
18
+ * - the remaining 7 bits in each byte are used for base-7 big-endian encoding of the numeric value of the integer (`YYYYYYY`).
19
+ * - you can read more about it on [wikipedia](https://en.wikipedia.org/wiki/Variable-length_quantity).
20
+ *
21
+ * the following table lists the first few bounds of this encoding:
22
+ *
23
+ * | decimal | unsigned big endian binary | unsigned variable binary |
24
+ * |------------------|---------------------------------------------|----------------------------------|
25
+ * | 0 | 0b00000000 0b00000000 0b00000000 0b00000000 | 0b00000000 |
26
+ * | 127 = 2^7 - 1 | 0b00000000 0b00000000 0b00000000 0b01111111 | 0b01111111 |
27
+ * | 128 = 2^7 | 0b00000000 0b00000000 0b00000000 0b10000000 | 0b10000001 0b00000000 |
28
+ * | 16383 = 2^14 - 1 | 0b00000000 0b00000000 0b00111111 0b11111111 | 0b11111111 0b01111111 |
29
+ * | 16384 = 2^14 | 0b00000000 0b00000000 0b01000000 0b00000000 | 0b10000001 0b10000000 0b00000000 |
30
+ *
31
+ * ### Signed integer case
32
+ *
33
+ * - the `ivar` encoding is similar to the `uvar` encoding, with the exception that in the first byte,
34
+ * the second-major bit `Z` of the octet (0b0ZYYYYYY) signals whether the number is positive (Z == 0), or negative (Z == 1).
35
+ *
36
+ * the following table lists the first few bounds of this encoding:
37
+ *
38
+ * | decimal | signed big endian binary | signed variable binary |
39
+ * |---------------------|---------------------------------------------|----------------------------------|
40
+ * | 0 | 0b00000000 0b00000000 0b00000000 0b00000000 | 0b00000000 or 0b01000000 |
41
+ * | 63 = 2^6 - 1 | 0b00000000 0b00000000 0b00000000 0b00111111 | 0b00111111 |
42
+ * | -63 = -(2^6 - 1) | 0b00000000 0b00000000 0b00000000 0b11000001 | 0b01111111 |
43
+ * | 8191 = 2^13 - 1 | 0b00000000 0b00000000 0b00011111 0b11111111 | 0b10111111 0b01111111 |
44
+ * | -8191 = -(2^13 - 1) | 0b00000000 0b00000000 0b11100000 0b00000001 | 0b11111111 0b01111111 |
45
+ *
46
+ * @module
47
+ */
48
+ import type { DecodeFunc, EncodeFunc } from "./eightpack.js";
49
+ import type { VarNumericArrayType, VarNumericType } from "./typedefs.js";
50
+ /** encode a `number` as a variable sized integer (signed or unsigned) in binary. */
51
+ export declare const encode_varint: EncodeFunc<number, [type: VarNumericType]>;
52
+ /** encode an array of `number`s as variable sized integers (signed or unsigned) in binary. */
53
+ export declare const encode_varint_array: EncodeFunc<number[], [type: VarNumericArrayType]>;
54
+ /** decode an byte buffer as a variable sized integer of the given `type` (signed or unsigned). */
55
+ export declare const decode_varint: DecodeFunc<number, [type: VarNumericType]>;
56
+ /** decode an byte buffer as an array of variable sized integers of the given `type` (signed or unsigned) and `array_length`. */
57
+ export declare const decode_varint_array: DecodeFunc<number[], [type: VarNumericArrayType, array_length?: number]>;
58
+ /** byte encoder for an array of unsigned-integers.
59
+ * use {@link decode_uvar_array} for decoding the result.
60
+ */
61
+ export declare const encode_uvar_array: EncodeFunc<number[]>;
62
+ /** byte buffer decoder for an array of unsigned-integers of the given (optional) `array_length`.
63
+ * use {@link encode_uvar_array} for encoding first.
64
+ */
65
+ export declare const decode_uvar_array: DecodeFunc<number[], [array_length?: number]>;
66
+ /** byte encoder for an array of signed-integers.
67
+ * use {@link decode_ivar_array} for decoding the result.
68
+ */
69
+ export declare const encode_ivar_array: EncodeFunc<number[]>;
70
+ /** byte buffer decoder for an array of signed-integers of the given (optional) `array_length`.
71
+ * use {@link encode_ivar_array} for encoding first.
72
+ */
73
+ export declare const decode_ivar_array: DecodeFunc<number[], [array_length?: number]>;
74
+ /** a single variable-sized unsigned-integer byte encoder.
75
+ * use {@link decode_uvar} for decoding the result.
76
+ */
77
+ export declare const encode_uvar: EncodeFunc<number>;
78
+ /** a single variable-sized unsigned-integers decoder.
79
+ * use {@link encode_uvar} for encoding first.
80
+ */
81
+ export declare const decode_uvar: DecodeFunc<number>;
82
+ /** a single variable-sized signed-integer byte encoder.
83
+ * use {@link decode_ivar} for decoding the result.
84
+ */
85
+ export declare const encode_ivar: EncodeFunc<number>;
86
+ /** a single variable-sized signed-integers decoder.
87
+ * use {@link encode_ivar} for encoding first.
88
+ */
89
+ export declare const decode_ivar: DecodeFunc<number>;
90
+ //# sourceMappingURL=eightpack_varint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eightpack_varint.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@oazmi/kitchensink/0.10.0/src/eightpack_varint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CE;AAEF,OAAO,KAAK,EAAW,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGxE,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,CAA0F,CAAA;AAE/J,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE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