@nnilky/structo 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/structo/datatypes/containers/array.d.ts +2 -0
- package/{structo/datatypes/containers/array.ts → dist/structo/datatypes/containers/array.js} +5 -7
- package/dist/structo/datatypes/containers/fastObject.d.ts +6 -0
- package/{structo/datatypes/containers/fastObject.ts → dist/structo/datatypes/containers/fastObject.js} +12 -32
- package/dist/structo/datatypes/containers/list.d.ts +5 -0
- package/{structo/datatypes/containers/list.ts → dist/structo/datatypes/containers/list.js} +3 -10
- package/dist/structo/datatypes/containers/object.d.ts +9 -0
- package/dist/structo/datatypes/containers/object.js +24 -0
- package/dist/structo/datatypes/containers/sizedbuffer.d.ts +2 -0
- package/{structo/datatypes/containers/sizedbuffer.ts → dist/structo/datatypes/containers/sizedbuffer.js} +1 -4
- package/{structo/datatypes/index.ts → dist/structo/datatypes/index.d.ts} +0 -3
- package/dist/structo/datatypes/index.js +15 -0
- package/dist/structo/datatypes/numbers/bigints.d.ts +3 -0
- package/{structo/datatypes/numbers/bigints.ts → dist/structo/datatypes/numbers/bigints.js} +3 -14
- package/dist/structo/datatypes/numbers/floats.d.ts +3 -0
- package/{structo/datatypes/numbers/floats.ts → dist/structo/datatypes/numbers/floats.js} +2 -5
- package/dist/structo/datatypes/numbers/sints.d.ts +5 -0
- package/{structo/datatypes/numbers/sints.ts → dist/structo/datatypes/numbers/sints.js} +5 -16
- package/dist/structo/datatypes/numbers/uints.d.ts +5 -0
- package/{structo/datatypes/numbers/uints.ts → dist/structo/datatypes/numbers/uints.js} +20 -26
- package/dist/structo/datatypes/transforms/pipe.d.ts +11 -0
- package/dist/structo/datatypes/transforms/pipe.js +4 -0
- package/dist/structo/datatypes/transforms/readOffset.d.ts +2 -0
- package/{structo/datatypes/transforms/readOffset.ts → dist/structo/datatypes/transforms/readOffset.js} +2 -4
- package/dist/structo/datatypes/transforms/transform.d.ts +2 -0
- package/{structo/datatypes/transforms/transform.ts → dist/structo/datatypes/transforms/transform.js} +2 -4
- package/dist/structo/datatypes/values/buffer.d.ts +2 -0
- package/{structo/datatypes/values/buffer.ts → dist/structo/datatypes/values/buffer.js} +3 -5
- package/dist/structo/datatypes/values/byteliteral.d.ts +2 -0
- package/{structo/datatypes/values/byteliteral.ts → dist/structo/datatypes/values/byteliteral.js} +1 -5
- package/dist/structo/datatypes/values/string.d.ts +2 -0
- package/{structo/datatypes/values/string.ts → dist/structo/datatypes/values/string.js} +1 -8
- package/dist/structo/index.d.ts +4 -0
- package/dist/structo/index.js +3 -0
- package/dist/structo/read.d.ts +7 -0
- package/dist/structo/read.js +10 -0
- package/{structo/types.ts → dist/structo/types.d.ts} +0 -3
- package/dist/structo/types.js +1 -0
- package/dist/structo/write.d.ts +3 -0
- package/{structo/write.ts → dist/structo/write.js} +9 -11
- package/package.json +31 -7
- package/structo/datatypes/containers/__snapshots__/list.test.ts.snap +0 -25
- package/structo/datatypes/containers/__snapshots__/object.test.ts.snap +0 -37
- package/structo/datatypes/containers/array.test.ts +0 -28
- package/structo/datatypes/containers/list.test.ts +0 -44
- package/structo/datatypes/containers/object.test.ts +0 -42
- package/structo/datatypes/containers/object.ts +0 -40
- package/structo/datatypes/containers/sizedbuffer.test.ts +0 -34
- package/structo/datatypes/lazy.ts +0 -0
- package/structo/datatypes/numbers/__snapshots__/bigints.test.ts.snap +0 -261
- package/structo/datatypes/numbers/__snapshots__/floats.test.ts.snap +0 -191
- package/structo/datatypes/numbers/__snapshots__/sints.test.ts.snap +0 -321
- package/structo/datatypes/numbers/__snapshots__/uints.test.ts.snap +0 -321
- package/structo/datatypes/numbers/bigints.test.ts +0 -85
- package/structo/datatypes/numbers/floats.test.ts +0 -91
- package/structo/datatypes/numbers/sints.test.ts +0 -109
- package/structo/datatypes/numbers/uints.test.ts +0 -110
- package/structo/datatypes/transforms/pipe.test.ts +0 -17
- package/structo/datatypes/transforms/pipe.ts +0 -88
- package/structo/datatypes/utils.test.ts +0 -39
- package/structo/datatypes/values/buffer.test.ts +0 -52
- package/structo/datatypes/values/string.test.ts +0 -22
- package/structo/index.ts +0 -11
- package/structo/read.ts +0 -14
- package/structo/utils.test.ts +0 -0
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export function write<T>(serializer: Serializer<T>, value: T): ArrayBuffer {
|
|
1
|
+
export function write(serializer, value) {
|
|
4
2
|
const ctx = createdWriterContext(serializer);
|
|
5
3
|
serializer.write(ctx, value);
|
|
6
|
-
|
|
7
4
|
if (ctx.buffer.byteLength === ctx.offset) {
|
|
8
5
|
return ctx.buffer;
|
|
9
|
-
}
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
10
8
|
return ctx.buffer.transfer(ctx.offset);
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
export function createdWriterContext(type: Serializer<any>): WriterContext {
|
|
11
|
+
export function createdWriterContext(type) {
|
|
15
12
|
if (type.size) {
|
|
16
13
|
let buffer = new ArrayBuffer(type.size);
|
|
17
14
|
const view = new DataView(buffer);
|
|
@@ -19,9 +16,10 @@ export function createdWriterContext(type: Serializer<any>): WriterContext {
|
|
|
19
16
|
offset: 0,
|
|
20
17
|
buffer,
|
|
21
18
|
view,
|
|
22
|
-
alloc: Function.prototype
|
|
19
|
+
alloc: Function.prototype,
|
|
23
20
|
};
|
|
24
|
-
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
25
23
|
let bufferLength = 64;
|
|
26
24
|
let buffer = new ArrayBuffer(bufferLength);
|
|
27
25
|
const view = new DataView(buffer);
|
|
@@ -30,8 +28,8 @@ export function createdWriterContext(type: Serializer<any>): WriterContext {
|
|
|
30
28
|
buffer,
|
|
31
29
|
view,
|
|
32
30
|
alloc(length) {
|
|
33
|
-
if (length < 0)
|
|
34
|
-
|
|
31
|
+
if (length < 0)
|
|
32
|
+
return;
|
|
35
33
|
while (this.offset + length >= bufferLength) {
|
|
36
34
|
bufferLength = this.buffer.byteLength * 2;
|
|
37
35
|
this.buffer = this.buffer.transfer(bufferLength);
|
package/package.json
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nnilky/structo",
|
|
3
3
|
"description": "A library for serializing and deserializing binary content",
|
|
4
|
-
"keywords": ["library"],
|
|
4
|
+
"keywords": ["binary", "library", "utility", "web", "node"],
|
|
5
5
|
"license": "ISC",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.2",
|
|
7
7
|
"author": "Ben Brady",
|
|
8
8
|
"private": false,
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
|
|
9
|
+
"publishConfig": {"access": "public"},
|
|
10
|
+
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Ben-Brady/structo-ts.git"
|
|
11
14
|
},
|
|
12
15
|
|
|
13
16
|
"readme": "README.md",
|
|
14
|
-
"
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
15
21
|
"exports": {
|
|
16
|
-
"
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
".": {
|
|
24
|
+
"default": "./dist/index.js",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./index.js": {
|
|
29
|
+
"default": "./dist/index.js",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts"
|
|
32
|
+
}
|
|
17
33
|
},
|
|
18
|
-
"files": [
|
|
34
|
+
"files": [
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"README.md",
|
|
37
|
+
"./dist/**/*.d.ts",
|
|
38
|
+
"./dist/**/*.js.map",
|
|
39
|
+
"./dist/**/*.js"
|
|
40
|
+
],
|
|
19
41
|
|
|
20
42
|
"scripts": {
|
|
43
|
+
"build": "tsc",
|
|
44
|
+
"prepublish": "tsc",
|
|
21
45
|
"check": "tsc --noEmit",
|
|
22
46
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
23
47
|
},
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`st.list matches snapshots 1`] = `
|
|
4
|
-
ArrayBuffer [
|
|
5
|
-
3,
|
|
6
|
-
0,
|
|
7
|
-
0,
|
|
8
|
-
0,
|
|
9
|
-
3,
|
|
10
|
-
0,
|
|
11
|
-
102,
|
|
12
|
-
111,
|
|
13
|
-
111,
|
|
14
|
-
3,
|
|
15
|
-
0,
|
|
16
|
-
98,
|
|
17
|
-
97,
|
|
18
|
-
114,
|
|
19
|
-
3,
|
|
20
|
-
0,
|
|
21
|
-
98,
|
|
22
|
-
97,
|
|
23
|
-
122,
|
|
24
|
-
]
|
|
25
|
-
`;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`st.object matches snapshots 1`] = `
|
|
4
|
-
ArrayBuffer [
|
|
5
|
-
1,
|
|
6
|
-
0,
|
|
7
|
-
0,
|
|
8
|
-
0,
|
|
9
|
-
19,
|
|
10
|
-
0,
|
|
11
|
-
0,
|
|
12
|
-
0,
|
|
13
|
-
119,
|
|
14
|
-
111,
|
|
15
|
-
111,
|
|
16
|
-
102,
|
|
17
|
-
32,
|
|
18
|
-
119,
|
|
19
|
-
111,
|
|
20
|
-
111,
|
|
21
|
-
102,
|
|
22
|
-
32,
|
|
23
|
-
98,
|
|
24
|
-
97,
|
|
25
|
-
114,
|
|
26
|
-
107,
|
|
27
|
-
32,
|
|
28
|
-
98,
|
|
29
|
-
97,
|
|
30
|
-
114,
|
|
31
|
-
107,
|
|
32
|
-
19,
|
|
33
|
-
87,
|
|
34
|
-
19,
|
|
35
|
-
83,
|
|
36
|
-
]
|
|
37
|
-
`;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//@ts-ignore TODO
|
|
2
|
-
import { describe, it, expect } from "bun:test";
|
|
3
|
-
import { expectEncode, expectError, randint } from "../utils.test";
|
|
4
|
-
|
|
5
|
-
import * as st from "../../index";
|
|
6
|
-
|
|
7
|
-
describe("st.array", () => {
|
|
8
|
-
it("encode correctly", () => {
|
|
9
|
-
const spec = st.array(4, st.u16());
|
|
10
|
-
expectEncode(spec, [1, 2, 3, 4]);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("works on empty lists", () => {
|
|
14
|
-
const spec = st.array(0, st.u16());
|
|
15
|
-
expectEncode(spec, []);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("throws error on invalid size", () => {
|
|
19
|
-
const spec = st.array(2, st.u16());
|
|
20
|
-
expectError(() => st.write(spec, [1]));
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("throws error on invalid value", () => {
|
|
24
|
-
const spec = st.array(2, st.u16());
|
|
25
|
-
expectError(() => st.write(spec, [1, -1]));
|
|
26
|
-
expectError(() => st.write(spec, [2 ** 16 + 1, 0]));
|
|
27
|
-
});
|
|
28
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//@ts-ignore TODO
|
|
2
|
-
import { describe, it, expect } from "bun:test";
|
|
3
|
-
import { expectEncode, expectEncodeSnapshot, expectError, randint } from "../utils.test";
|
|
4
|
-
|
|
5
|
-
import * as st from "../../index";
|
|
6
|
-
|
|
7
|
-
describe("st.list", () => {
|
|
8
|
-
it("encode correctly", () => {
|
|
9
|
-
const spec = st.list({ type: st.u16(), length: st.u8() });
|
|
10
|
-
expectEncode(spec, [1, 2, 3, 4]);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("works on empty lists", () => {
|
|
14
|
-
const spec = st.list({ type: st.u16(), length: st.u8() });
|
|
15
|
-
expectEncode(spec, []);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("throws error on too large array", () => {
|
|
19
|
-
const spec = st.list({ type: st.u16(), length: st.u8() });
|
|
20
|
-
expectError(() => {
|
|
21
|
-
st.write(
|
|
22
|
-
spec,
|
|
23
|
-
Array.from({ length: 10000 }, () => 0),
|
|
24
|
-
);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("throws error on invalid value", () => {
|
|
29
|
-
const spec = st.list({ type: st.u16(), length: st.u8() });
|
|
30
|
-
expectError(() => {
|
|
31
|
-
st.write(spec, [-1]);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it(`matches snapshots`, () => {
|
|
36
|
-
expectEncodeSnapshot(
|
|
37
|
-
st.list({
|
|
38
|
-
type: st.string(st.u16()),
|
|
39
|
-
length: st.s32(),
|
|
40
|
-
}),
|
|
41
|
-
["foo", "bar", "baz"],
|
|
42
|
-
);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//@ts-ignore TODO
|
|
2
|
-
import { describe, it, expect } from "bun:test";
|
|
3
|
-
import { bytes, expectEncode, expectEncodeSnapshot } from "../utils.test";
|
|
4
|
-
|
|
5
|
-
import * as st from "../../index";
|
|
6
|
-
|
|
7
|
-
describe("st.object", () => {
|
|
8
|
-
const test = st.object({
|
|
9
|
-
a: st.u8(),
|
|
10
|
-
b: st.u8(),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("encodes correctly", () => {
|
|
14
|
-
st.write(test, { b: 2, a: 1 });
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("encode in correct order", () => {
|
|
18
|
-
const data = st.write(test, { b: 2, a: 1 });
|
|
19
|
-
const arr = new Uint8Array(data);
|
|
20
|
-
expect(arr[0]).toBe(1);
|
|
21
|
-
expect(arr[1]).toBe(2);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("encodes empty", () => {
|
|
25
|
-
expectEncode(st.object({}), {});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it(`matches snapshots`, () => {
|
|
29
|
-
expectEncodeSnapshot(
|
|
30
|
-
st.object({
|
|
31
|
-
number: st.u32(),
|
|
32
|
-
puppy: st.string(st.s32()),
|
|
33
|
-
buffer: st.buffer(4),
|
|
34
|
-
}),
|
|
35
|
-
{
|
|
36
|
-
number: 1,
|
|
37
|
-
puppy: "woof woof bark bark",
|
|
38
|
-
buffer: bytes([19, 87, 19, 83]),
|
|
39
|
-
},
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { InferInput, InferOutput, Serializer } from "../../types";
|
|
2
|
-
|
|
3
|
-
type InferObjectInfer<T> =
|
|
4
|
-
T extends Record<string, Serializer<any>> ? { [Key in keyof T]: InferInput<T[Key]> } : never;
|
|
5
|
-
|
|
6
|
-
type InferObjectOutput<T> =
|
|
7
|
-
T extends Record<string, Serializer<any>> ? { [Key in keyof T]: InferOutput<T[Key]> } : never;
|
|
8
|
-
|
|
9
|
-
export function object<T extends Record<string, Serializer<any>>>(
|
|
10
|
-
definition: T,
|
|
11
|
-
): Serializer<InferObjectInfer<T>, InferObjectOutput<T>> {
|
|
12
|
-
const entires = Object.entries(definition);
|
|
13
|
-
|
|
14
|
-
// Use the fact: number + undefined = NaN
|
|
15
|
-
// Check for NaN afterwards
|
|
16
|
-
let computedSize = Object.values(definition).reduce(
|
|
17
|
-
(total, v) => total + (v.size as number),
|
|
18
|
-
0,
|
|
19
|
-
);
|
|
20
|
-
const size = isNaN(computedSize) ? undefined : computedSize;
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
size,
|
|
24
|
-
write: (ctx, value) => {
|
|
25
|
-
if (size) ctx.alloc(size);
|
|
26
|
-
|
|
27
|
-
for (let i = 0; i < entires.length; i++) {
|
|
28
|
-
entires[i][1].write(ctx, value[entires[i][0]]);
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
read: (ctx) => {
|
|
32
|
-
const output: [string, unknown][] = new Array(entires.length);
|
|
33
|
-
for (let i = 0; i < entires.length; i++) {
|
|
34
|
-
output[i] = [entires[i][0], entires[i][1].read(ctx)];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return Object.fromEntries(output) as InferObject<T>;
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//@ts-ignore TODO
|
|
2
|
-
import { describe, it, expect } from "bun:test";
|
|
3
|
-
import { bytes, expectEncode, expectError, randint } from "../utils.test";
|
|
4
|
-
|
|
5
|
-
import * as st from "../../index";
|
|
6
|
-
|
|
7
|
-
describe("st.buffer", () => {
|
|
8
|
-
it("encode correctly", () => {
|
|
9
|
-
const buffer = st.sizedBuffer(st.u8());
|
|
10
|
-
expectEncode(buffer, bytes([1, 2]));
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it("encodes empty correctly", () => {
|
|
14
|
-
const spec = st.sizedBuffer(st.u8());
|
|
15
|
-
expectEncode(spec, bytes([]));
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("holds large data", () => {
|
|
19
|
-
const size = 1024 * 1024 * 8; // 8MB
|
|
20
|
-
const spec = st.sizedBuffer(st.u32());
|
|
21
|
-
|
|
22
|
-
const data = new Uint8Array(size);
|
|
23
|
-
data.set([3, 4], 1000);
|
|
24
|
-
data.set([3, 4], 2000);
|
|
25
|
-
expectEncode(spec, data.buffer);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it("errors on invalid length", () => {
|
|
29
|
-
const spec = st.sizedBuffer(st.u8());
|
|
30
|
-
expectError(() => {
|
|
31
|
-
st.write(spec, bytes(Array.from({ length: 256 }, () => 0)));
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
});
|
|
File without changes
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
2
|
-
|
|
3
|
-
exports[`st.u64(little) matches snapshots 1`] = `
|
|
4
|
-
ArrayBuffer [
|
|
5
|
-
0,
|
|
6
|
-
0,
|
|
7
|
-
0,
|
|
8
|
-
0,
|
|
9
|
-
0,
|
|
10
|
-
0,
|
|
11
|
-
0,
|
|
12
|
-
0,
|
|
13
|
-
]
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
exports[`st.u64(little) matches snapshots 2`] = `
|
|
17
|
-
ArrayBuffer [
|
|
18
|
-
0,
|
|
19
|
-
0,
|
|
20
|
-
0,
|
|
21
|
-
0,
|
|
22
|
-
0,
|
|
23
|
-
0,
|
|
24
|
-
0,
|
|
25
|
-
0,
|
|
26
|
-
]
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
exports[`st.u64(little) matches snapshots 3`] = `
|
|
30
|
-
ArrayBuffer [
|
|
31
|
-
10,
|
|
32
|
-
0,
|
|
33
|
-
0,
|
|
34
|
-
0,
|
|
35
|
-
0,
|
|
36
|
-
0,
|
|
37
|
-
0,
|
|
38
|
-
0,
|
|
39
|
-
]
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`st.u64(little) matches snapshots 4`] = `
|
|
43
|
-
ArrayBuffer [
|
|
44
|
-
245,
|
|
45
|
-
255,
|
|
46
|
-
255,
|
|
47
|
-
255,
|
|
48
|
-
255,
|
|
49
|
-
255,
|
|
50
|
-
255,
|
|
51
|
-
255,
|
|
52
|
-
]
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
|
-
exports[`st.u64(little) matches snapshots 5`] = `
|
|
56
|
-
ArrayBuffer [
|
|
57
|
-
255,
|
|
58
|
-
255,
|
|
59
|
-
255,
|
|
60
|
-
255,
|
|
61
|
-
255,
|
|
62
|
-
255,
|
|
63
|
-
255,
|
|
64
|
-
255,
|
|
65
|
-
]
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
exports[`st.u64(big) matches snapshots 1`] = `
|
|
69
|
-
ArrayBuffer [
|
|
70
|
-
0,
|
|
71
|
-
0,
|
|
72
|
-
0,
|
|
73
|
-
0,
|
|
74
|
-
0,
|
|
75
|
-
0,
|
|
76
|
-
0,
|
|
77
|
-
0,
|
|
78
|
-
]
|
|
79
|
-
`;
|
|
80
|
-
|
|
81
|
-
exports[`st.u64(big) matches snapshots 2`] = `
|
|
82
|
-
ArrayBuffer [
|
|
83
|
-
0,
|
|
84
|
-
0,
|
|
85
|
-
0,
|
|
86
|
-
0,
|
|
87
|
-
0,
|
|
88
|
-
0,
|
|
89
|
-
0,
|
|
90
|
-
0,
|
|
91
|
-
]
|
|
92
|
-
`;
|
|
93
|
-
|
|
94
|
-
exports[`st.u64(big) matches snapshots 3`] = `
|
|
95
|
-
ArrayBuffer [
|
|
96
|
-
0,
|
|
97
|
-
0,
|
|
98
|
-
0,
|
|
99
|
-
0,
|
|
100
|
-
0,
|
|
101
|
-
0,
|
|
102
|
-
0,
|
|
103
|
-
10,
|
|
104
|
-
]
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
exports[`st.u64(big) matches snapshots 4`] = `
|
|
108
|
-
ArrayBuffer [
|
|
109
|
-
255,
|
|
110
|
-
255,
|
|
111
|
-
255,
|
|
112
|
-
255,
|
|
113
|
-
255,
|
|
114
|
-
255,
|
|
115
|
-
255,
|
|
116
|
-
245,
|
|
117
|
-
]
|
|
118
|
-
`;
|
|
119
|
-
|
|
120
|
-
exports[`st.u64(big) matches snapshots 5`] = `
|
|
121
|
-
ArrayBuffer [
|
|
122
|
-
255,
|
|
123
|
-
255,
|
|
124
|
-
255,
|
|
125
|
-
255,
|
|
126
|
-
255,
|
|
127
|
-
255,
|
|
128
|
-
255,
|
|
129
|
-
255,
|
|
130
|
-
]
|
|
131
|
-
`;
|
|
132
|
-
|
|
133
|
-
exports[`st.s64(little) matches snapshots 1`] = `
|
|
134
|
-
ArrayBuffer [
|
|
135
|
-
0,
|
|
136
|
-
0,
|
|
137
|
-
0,
|
|
138
|
-
0,
|
|
139
|
-
0,
|
|
140
|
-
0,
|
|
141
|
-
0,
|
|
142
|
-
0,
|
|
143
|
-
]
|
|
144
|
-
`;
|
|
145
|
-
|
|
146
|
-
exports[`st.s64(little) matches snapshots 2`] = `
|
|
147
|
-
ArrayBuffer [
|
|
148
|
-
0,
|
|
149
|
-
0,
|
|
150
|
-
0,
|
|
151
|
-
0,
|
|
152
|
-
0,
|
|
153
|
-
0,
|
|
154
|
-
0,
|
|
155
|
-
128,
|
|
156
|
-
]
|
|
157
|
-
`;
|
|
158
|
-
|
|
159
|
-
exports[`st.s64(little) matches snapshots 3`] = `
|
|
160
|
-
ArrayBuffer [
|
|
161
|
-
10,
|
|
162
|
-
0,
|
|
163
|
-
0,
|
|
164
|
-
0,
|
|
165
|
-
0,
|
|
166
|
-
0,
|
|
167
|
-
0,
|
|
168
|
-
128,
|
|
169
|
-
]
|
|
170
|
-
`;
|
|
171
|
-
|
|
172
|
-
exports[`st.s64(little) matches snapshots 4`] = `
|
|
173
|
-
ArrayBuffer [
|
|
174
|
-
245,
|
|
175
|
-
255,
|
|
176
|
-
255,
|
|
177
|
-
255,
|
|
178
|
-
255,
|
|
179
|
-
255,
|
|
180
|
-
255,
|
|
181
|
-
127,
|
|
182
|
-
]
|
|
183
|
-
`;
|
|
184
|
-
|
|
185
|
-
exports[`st.s64(little) matches snapshots 5`] = `
|
|
186
|
-
ArrayBuffer [
|
|
187
|
-
255,
|
|
188
|
-
255,
|
|
189
|
-
255,
|
|
190
|
-
255,
|
|
191
|
-
255,
|
|
192
|
-
255,
|
|
193
|
-
255,
|
|
194
|
-
127,
|
|
195
|
-
]
|
|
196
|
-
`;
|
|
197
|
-
|
|
198
|
-
exports[`st.s64(big) matches snapshots 1`] = `
|
|
199
|
-
ArrayBuffer [
|
|
200
|
-
0,
|
|
201
|
-
0,
|
|
202
|
-
0,
|
|
203
|
-
0,
|
|
204
|
-
0,
|
|
205
|
-
0,
|
|
206
|
-
0,
|
|
207
|
-
0,
|
|
208
|
-
]
|
|
209
|
-
`;
|
|
210
|
-
|
|
211
|
-
exports[`st.s64(big) matches snapshots 2`] = `
|
|
212
|
-
ArrayBuffer [
|
|
213
|
-
128,
|
|
214
|
-
0,
|
|
215
|
-
0,
|
|
216
|
-
0,
|
|
217
|
-
0,
|
|
218
|
-
0,
|
|
219
|
-
0,
|
|
220
|
-
0,
|
|
221
|
-
]
|
|
222
|
-
`;
|
|
223
|
-
|
|
224
|
-
exports[`st.s64(big) matches snapshots 3`] = `
|
|
225
|
-
ArrayBuffer [
|
|
226
|
-
128,
|
|
227
|
-
0,
|
|
228
|
-
0,
|
|
229
|
-
0,
|
|
230
|
-
0,
|
|
231
|
-
0,
|
|
232
|
-
0,
|
|
233
|
-
10,
|
|
234
|
-
]
|
|
235
|
-
`;
|
|
236
|
-
|
|
237
|
-
exports[`st.s64(big) matches snapshots 4`] = `
|
|
238
|
-
ArrayBuffer [
|
|
239
|
-
127,
|
|
240
|
-
255,
|
|
241
|
-
255,
|
|
242
|
-
255,
|
|
243
|
-
255,
|
|
244
|
-
255,
|
|
245
|
-
255,
|
|
246
|
-
245,
|
|
247
|
-
]
|
|
248
|
-
`;
|
|
249
|
-
|
|
250
|
-
exports[`st.s64(big) matches snapshots 5`] = `
|
|
251
|
-
ArrayBuffer [
|
|
252
|
-
127,
|
|
253
|
-
255,
|
|
254
|
-
255,
|
|
255
|
-
255,
|
|
256
|
-
255,
|
|
257
|
-
255,
|
|
258
|
-
255,
|
|
259
|
-
255,
|
|
260
|
-
]
|
|
261
|
-
`;
|