mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
feat(encoding): add unsigned LEB128 varint encoding (#2265)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This commit is contained in:
parent
7d88c3337a
commit
f415da4c62
73
.github/workflows/ci.yml
vendored
73
.github/workflows/ci.yml
vendored
@ -207,3 +207,76 @@ jobs:
|
||||
path: |-
|
||||
./_wasm_crypto/crypto.mjs
|
||||
./_wasm_crypto/crypto.wasm.mjs
|
||||
|
||||
varint-wasm:
|
||||
name: "_wasm_varint/"
|
||||
runs-on: ${{ github.repository_owner == 'denoland' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# required to check for changes
|
||||
fetch-depth: 2
|
||||
submodules: false
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check for changes to _wasm_varint/
|
||||
id: source
|
||||
run: |-
|
||||
set -o errexit
|
||||
shopt -s inherit_errexit
|
||||
declare modifications="$(git diff --name-only HEAD~ -- ./_wasm_varint)"
|
||||
declare modified="$([[ "$modifications" ]] && echo true || echo false)"
|
||||
echo "::set-output name=modified::$modified"
|
||||
echo "WASM varint source modified in this commit? $modified"
|
||||
echo "$modifications"
|
||||
|
||||
- name: Set up Deno
|
||||
uses: denoland/setup-deno@v1.0.0
|
||||
if: success() && steps.source.outputs.modified == 'true'
|
||||
|
||||
- name: Set up Rust
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
if: success() && steps.source.outputs.modified == 'true'
|
||||
with:
|
||||
# This must match the version in _wasm_varint/rust-toolchain.toml:
|
||||
rust-version: 1.57.0
|
||||
targets: wasm32-unknown-unknown
|
||||
components: rustfmt
|
||||
|
||||
- name: Set up wasm-bindgen-cli
|
||||
run: |-
|
||||
# This must match the version in _wasm_varint/Cargo.lock:
|
||||
cargo install -f wasm-bindgen-cli --version 0.2.80
|
||||
if: success() && steps.source.outputs.modified == 'true'
|
||||
|
||||
- name: Rebuild WASM
|
||||
if: success() && steps.source.outputs.modified == 'true'
|
||||
run: |-
|
||||
./_wasm_varint/_build.ts
|
||||
|
||||
- name: Verify WASM hasn't changed
|
||||
id: build
|
||||
if: success() && steps.source.outputs.modified == 'true'
|
||||
run: |-
|
||||
set -o errexit
|
||||
shopt -s inherit_errexit
|
||||
declare modifications="$(git status --porcelain)"
|
||||
declare modified="$([[ "$(git status --porcelain)" ]] && echo true || echo false)"
|
||||
echo "::set-output name=modified::$modified"
|
||||
echo "Generated code modified? $modified"
|
||||
echo "$modifications"
|
||||
|
||||
if [[ "$modified" = "true" ]]; then
|
||||
echo "::error ::Rebuilt WASM doesn't match committed WASM. Please rebuild and commit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload rebuilt ./_wasm_varint/ as artifact if it didn't match committed
|
||||
if: failure() && steps.build.outputs.modified == 'true'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Rebuilt _wasm_varint
|
||||
path: |-
|
||||
./_wasm_varint/varint.mjs
|
||||
./_wasm_varint/varint.wasm.mjs
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,5 +7,6 @@ package-lock.json
|
||||
.vscode/settings.json
|
||||
**/cov/
|
||||
/_wasm_crypto/target
|
||||
/_wasm_varint/target
|
||||
# TODO(nayeemrmn): Remove (https://github.com/denoland/deno_std/pull/1819#issuecomment-1011136991).
|
||||
/_deno_unstable_checked.ts
|
||||
|
4
_wasm_varint/.rustfmt.toml
Normal file
4
_wasm_varint/.rustfmt.toml
Normal file
@ -0,0 +1,4 @@
|
||||
# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
max_width = 80
|
||||
tab_spaces = 2
|
||||
edition = "2018"
|
126
_wasm_varint/Cargo.lock
generated
Normal file
126
_wasm_varint/Cargo.lock
generated
Normal file
@ -0,0 +1,126 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "deno_std_wasm_varint"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
|
17
_wasm_varint/Cargo.toml
Normal file
17
_wasm_varint/Cargo.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "deno_std_wasm_varint"
|
||||
repository = "https://github.com/denoland/deno_std"
|
||||
authors = ["the Deno authors"]
|
||||
license = "MIT"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
opt-level = 3
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "0.2.80"
|
142
_wasm_varint/_build.ts
Executable file
142
_wasm_varint/_build.ts
Executable file
@ -0,0 +1,142 @@
|
||||
#!/usr/bin/env -S deno run --allow-run --allow-read --allow-write --allow-env
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
import * as base64 from "../encoding/base64.ts";
|
||||
|
||||
const root = new URL(".", import.meta.url).pathname;
|
||||
|
||||
// Run in the same directory as this script is located.
|
||||
if (new URL(import.meta.url).protocol === "file:") {
|
||||
Deno.chdir(root);
|
||||
} else {
|
||||
console.error("build.ts can only be run locally (from a file: URL).");
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
||||
// Format the Rust code.
|
||||
if (
|
||||
!((await Deno.run({
|
||||
cmd: [
|
||||
"cargo",
|
||||
"fmt",
|
||||
],
|
||||
}).status()).success)
|
||||
) {
|
||||
console.error(`Failed to format the Rust code.`);
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
||||
// Compile the Rust code to WASM.
|
||||
if (
|
||||
!((await Deno.run({
|
||||
cmd: [
|
||||
"cargo",
|
||||
"build",
|
||||
"--release",
|
||||
"--target=wasm32-unknown-unknown",
|
||||
],
|
||||
}).status()).success)
|
||||
) {
|
||||
console.error(`Failed to compile the Rust code to WASM.`);
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
||||
const copyrightLine = `// Copyright 2018-${
|
||||
new Date().getFullYear()
|
||||
} the Deno authors. All rights reserved. MIT license.`;
|
||||
|
||||
// Generate JavaScript bindings from WASM.
|
||||
if (
|
||||
!((await Deno.run({
|
||||
cmd: [
|
||||
"wasm-bindgen",
|
||||
"./target/wasm32-unknown-unknown/release/deno_std_wasm_varint.wasm",
|
||||
"--target",
|
||||
"deno",
|
||||
"--weak-refs",
|
||||
"--out-dir",
|
||||
"./target/wasm32-bindgen-deno-js",
|
||||
],
|
||||
}).status()).success)
|
||||
) {
|
||||
console.error(`Failed to generate JavaScript bindings from WASM.`);
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
||||
// Encode WASM binary as a TypeScript module.
|
||||
const generatedWasm = await Deno.readFile(
|
||||
"./target/wasm32-bindgen-deno-js/deno_std_wasm_varint_bg.wasm",
|
||||
);
|
||||
|
||||
// Format WASM binary size with _ thousands separators for human readability,
|
||||
// so that any changes in size will be clear in diffs.
|
||||
const formattedWasmSize = generatedWasm.length.toString().padStart(
|
||||
Math.ceil(generatedWasm.length.toString().length / 3) * 3,
|
||||
).replace(/...\B/g, "$&_").trim();
|
||||
|
||||
// Generate a hash of the WASM in the format required by subresource integrity.
|
||||
const wasmIntegrity = `sha256-${
|
||||
base64.encode(await crypto.subtle!.digest("SHA-256", generatedWasm))
|
||||
}`;
|
||||
|
||||
const wasmJs = `${copyrightLine}
|
||||
// This file is automatically @generated by _build.ts
|
||||
// It is not intended for manual editing.
|
||||
import * as base64 from "../encoding/base64.ts";
|
||||
|
||||
export const size = ${formattedWasmSize};
|
||||
export const name = "varint.wasm";
|
||||
export const type = "application/wasm";
|
||||
export const hash = ${JSON.stringify(wasmIntegrity)};
|
||||
export const data = base64.decode("\\\n${
|
||||
base64.encode(generatedWasm).replace(/.{78}/g, "$&\\\n")
|
||||
}\\\n");
|
||||
|
||||
export default data;
|
||||
`;
|
||||
|
||||
// Modify the generated WASM bindings, replacing the runtime fetching of the
|
||||
// WASM binary file with a static TypeScript import of the copy we encoded
|
||||
// above. This eliminates the need for net or read permissions.
|
||||
const generatedScript = await Deno.readTextFile(
|
||||
"./target/wasm32-bindgen-deno-js/deno_std_wasm_varint.js",
|
||||
);
|
||||
const bindingsJs = `${copyrightLine}
|
||||
// This file is automatically @generated by _build.ts
|
||||
// It is not intended for manual editing.
|
||||
// deno-lint-ignore-file
|
||||
import wasmBytes from "./varint.wasm.mjs";
|
||||
|
||||
${
|
||||
generatedScript.replace(
|
||||
/^const wasm_url =.*?;\nlet wasmCode =.*?;\n.*?const wasmInstance =.*?;\n/sm,
|
||||
`const wasmModule = new WebAssembly.Module(wasmBytes);\n` +
|
||||
`const wasmInstance = new WebAssembly.Instance(wasmModule, imports);`,
|
||||
)
|
||||
}
|
||||
|
||||
// for testing/debugging
|
||||
export const _wasm = wasm;
|
||||
export const _wasmModule = wasmModule;
|
||||
export const _wasmInstance = wasmInstance;
|
||||
export const _wasmBytes = wasmBytes;
|
||||
`;
|
||||
|
||||
await Deno.writeTextFile("./varint.wasm.mjs", wasmJs);
|
||||
await Deno.writeTextFile("./varint.mjs", bindingsJs);
|
||||
|
||||
// Format the generated files.
|
||||
if (
|
||||
!(await Deno.run({
|
||||
cmd: [
|
||||
"deno",
|
||||
"fmt",
|
||||
"./varint.wasm.mjs",
|
||||
"./varint.mjs",
|
||||
],
|
||||
}).status()).success
|
||||
) {
|
||||
console.error(
|
||||
`Failed to format generated code.`,
|
||||
);
|
||||
Deno.exit(1);
|
||||
}
|
3
_wasm_varint/rust-toolchain.toml
Normal file
3
_wasm_varint/rust-toolchain.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "1.57.0"
|
||||
targets = ["wasm32-unknown-unknown"]
|
45
_wasm_varint/src/lib.rs
Normal file
45
_wasm_varint/src/lib.rs
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn encode_u32(val: u32) -> Vec<u8> {
|
||||
encode_u64(val as u64)
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn encode_u64(mut val: u64) -> Vec<u8> {
|
||||
let mut buff = Vec::with_capacity(10);
|
||||
loop {
|
||||
// If MSB == 0
|
||||
if (val & !0x7F) == 0 {
|
||||
buff.push(val as u8);
|
||||
break;
|
||||
}
|
||||
buff.push((val & 0x7F | 0x80) as u8);
|
||||
val >>= 7;
|
||||
}
|
||||
|
||||
buff
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn decode_u32(buff: Vec<u8>) -> u32 {
|
||||
decode_u64(buff) as u32
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn decode_u64(buff: Vec<u8>) -> u64 {
|
||||
let mut value: u64 = 0;
|
||||
let mut length = 0;
|
||||
loop {
|
||||
let byte = buff[length] as u64;
|
||||
value |= (byte & 0x7F) << (7 * length);
|
||||
length += 1;
|
||||
|
||||
if byte & 0x80 != 0x80 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
value
|
||||
}
|
126
_wasm_varint/varint.mjs
Normal file
126
_wasm_varint/varint.mjs
Normal file
@ -0,0 +1,126 @@
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
// This file is automatically @generated by _build.ts
|
||||
// It is not intended for manual editing.
|
||||
// deno-lint-ignore-file
|
||||
import wasmBytes from "./varint.wasm.mjs";
|
||||
|
||||
let cachegetInt32Memory0 = null;
|
||||
function getInt32Memory0() {
|
||||
if (
|
||||
cachegetInt32Memory0 === null ||
|
||||
cachegetInt32Memory0.buffer !== wasm.memory.buffer
|
||||
) {
|
||||
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetInt32Memory0;
|
||||
}
|
||||
|
||||
let cachegetUint8Memory0 = null;
|
||||
function getUint8Memory0() {
|
||||
if (
|
||||
cachegetUint8Memory0 === null ||
|
||||
cachegetUint8Memory0.buffer !== wasm.memory.buffer
|
||||
) {
|
||||
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
||||
}
|
||||
return cachegetUint8Memory0;
|
||||
}
|
||||
|
||||
function getArrayU8FromWasm0(ptr, len) {
|
||||
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
||||
}
|
||||
/**
|
||||
* @param {number} val
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
export function encode_u32(val) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
wasm.encode_u32(retptr, val);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
var v0 = getArrayU8FromWasm0(r0, r1).slice();
|
||||
wasm.__wbindgen_free(r0, r1 * 1);
|
||||
return v0;
|
||||
} finally {
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
|
||||
const u32CvtShim = new Uint32Array(2);
|
||||
|
||||
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
||||
/**
|
||||
* @param {BigInt} val
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
export function encode_u64(val) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
uint64CvtShim[0] = val;
|
||||
const low0 = u32CvtShim[0];
|
||||
const high0 = u32CvtShim[1];
|
||||
wasm.encode_u64(retptr, low0, high0);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
||||
wasm.__wbindgen_free(r0, r1 * 1);
|
||||
return v1;
|
||||
} finally {
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
|
||||
let WASM_VECTOR_LEN = 0;
|
||||
|
||||
function passArray8ToWasm0(arg, malloc) {
|
||||
const ptr = malloc(arg.length * 1);
|
||||
getUint8Memory0().set(arg, ptr / 1);
|
||||
WASM_VECTOR_LEN = arg.length;
|
||||
return ptr;
|
||||
}
|
||||
/**
|
||||
* @param {Uint8Array} buff
|
||||
* @returns {number}
|
||||
*/
|
||||
export function decode_u32(buff) {
|
||||
const ptr0 = passArray8ToWasm0(buff, wasm.__wbindgen_malloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
const ret = wasm.decode_u32(ptr0, len0);
|
||||
return ret >>> 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Uint8Array} buff
|
||||
* @returns {BigInt}
|
||||
*/
|
||||
export function decode_u64(buff) {
|
||||
try {
|
||||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
||||
const ptr0 = passArray8ToWasm0(buff, wasm.__wbindgen_malloc);
|
||||
const len0 = WASM_VECTOR_LEN;
|
||||
wasm.decode_u64(retptr, ptr0, len0);
|
||||
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
||||
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
||||
u32CvtShim[0] = r0;
|
||||
u32CvtShim[1] = r1;
|
||||
const n1 = uint64CvtShim[0];
|
||||
return n1;
|
||||
} finally {
|
||||
wasm.__wbindgen_add_to_stack_pointer(16);
|
||||
}
|
||||
}
|
||||
|
||||
const imports = {
|
||||
__wbindgen_placeholder__: {},
|
||||
};
|
||||
|
||||
const wasmModule = new WebAssembly.Module(wasmBytes);
|
||||
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
||||
const wasm = wasmInstance.exports;
|
||||
|
||||
// for testing/debugging
|
||||
export const _wasm = wasm;
|
||||
export const _wasmModule = wasmModule;
|
||||
export const _wasmInstance = wasmInstance;
|
||||
export const _wasmBytes = wasmBytes;
|
289
_wasm_varint/varint.wasm.mjs
Normal file
289
_wasm_varint/varint.wasm.mjs
Normal file
@ -0,0 +1,289 @@
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
// This file is automatically @generated by _build.ts
|
||||
// It is not intended for manual editing.
|
||||
import * as base64 from "../encoding/base64.ts";
|
||||
|
||||
export const size = 15_989;
|
||||
export const name = "varint.wasm";
|
||||
export const type = "application/wasm";
|
||||
export const hash = "sha256-eBJRh7xHK9KJ5+Kf4Enxt04brE8Pi1p7RIGrh9zwu4Y=";
|
||||
export const data = base64.decode(
|
||||
"\
|
||||
AGFzbQEAAAABu4CAgAAKYAAAYAF/AGABfwF/YAF/AX5gAn9/AGACf38Bf2ADf39/AGADf39/AX9gBH\
|
||||
9/f38Bf2AGf39/f39/AAOfgICAAB4CAQQIBQUGBAcECQYFBAAHBgIEBAIBBAACBAMABAEEhYCAgAAB\
|
||||
cAEFBQWDgICAAAEAEQaJgICAAAF/AUGAgMAACweGgYCAAAgGbWVtb3J5AgAKZW5jb2RlX3UzMgAHCm\
|
||||
VuY29kZV91NjQABgpkZWNvZGVfdTMyAAwKZGVjb2RlX3U2NAALH19fd2JpbmRnZW5fYWRkX3RvX3N0\
|
||||
YWNrX3BvaW50ZXIAGA9fX3diaW5kZ2VuX2ZyZWUAFhFfX3diaW5kZ2VuX21hbGxvYwARCYqAgIAAAQ\
|
||||
BBAQsEHAQdGgqF64CAAB6sLQIJfwF+AkACQAJAAkACQCAAQfUBSQ0AQQAhASAAQc3/e08NBCAAQQtq\
|
||||
IgBBeHEhAkEAKALog0AiA0UNA0EAIQQCQCACQYACSQ0AQR8hBCACQf///wdLDQAgAkEGIABBCHZnIg\
|
||||
BrdkEBcSAAQQF0a0E+aiEEC0EAIAJrIQECQCAEQQJ0QfSFwABqKAIAIgBFDQBBACEFIAJBAEEZIARB\
|
||||
AXZrQR9xIARBH0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IAIgFFDQIgBUEBdCEFIAEhBy\
|
||||
ABKAIEQXhxIAJHDQALCyABKAIIIgIgADYCDCABIAA2AgggAEEANgIYIAAgATYCDCAAIAI2AggMAwsg\
|
||||
CCAANgIAIAAgBzYCGAsgACAANgIMIAAgADYCCAwBCyACQQN2IgFBA3RB7IPAAGohAgJAAkBBACgC5I\
|
||||
NAIgVBASABdCIBcUUNACACKAIIIQEMAQtBACAFIAFyNgLkg0AgAiEBCyACIAA2AgggASAANgIMIAAg\
|
||||
AjYCDCAAIAE2AggLIAZBCGoPC0EAQf8fNgKkh0BBACAINgKQh0BBACAGNgKMh0BBAEHsg8AANgL4g0\
|
||||
BBAEH0g8AANgKAhEBBAEHsg8AANgL0g0BBAEH8g8AANgKIhEBBAEH0g8AANgL8g0BBAEGEhMAANgKQ\
|
||||
hEBBAEH8g8AANgKEhEBBAEGMhMAANgKYhEBBAEGEhMAANgKMhEBBAEGUhMAANgKghEBBAEGMhMAANg\
|
||||
KUhEBBAEGchMAANgKohEBBAEGUhMAANgKchEBBAEGkhMAANgKwhEBBAEGchMAANgKkhEBBAEEANgKY\
|
||||
h0BBAEGshMAANgK4hEBBAEGkhMAANgKshEBBAEGshMAANgK0hEBBAEG0hMAANgLAhEBBAEG0hMAANg\
|
||||
K8hEBBAEG8hMAANgLIhEBBAEG8hMAANgLEhEBBAEHEhMAANgLQhEBBAEHEhMAANgLMhEBBAEHMhMAA\
|
||||
NgLYhEBBAEHMhMAANgLUhEBBAEHUhMAANgLghEBBAEHUhMAANgLchEBBAEHchMAANgLohEBBAEHchM\
|
||||
AANgLkhEBBAEHkhMAANgLwhEBBAEHkhMAANgLshEBBAEHshMAANgL4hEBBAEH0hMAANgKAhUBBAEHs\
|
||||
hMAANgL0hEBBAEH8hMAANgKIhUBBAEH0hMAANgL8hEBBAEGEhcAANgKQhUBBAEH8hMAANgKEhUBBAE\
|
||||
GMhcAANgKYhUBBAEGEhcAANgKMhUBBAEGUhcAANgKghUBBAEGMhcAANgKUhUBBAEGchcAANgKohUBB\
|
||||
AEGUhcAANgKchUBBAEGkhcAANgKwhUBBAEGchcAANgKkhUBBAEGshcAANgK4hUBBAEGkhcAANgKshU\
|
||||
BBAEG0hcAANgLAhUBBAEGshcAANgK0hUBBAEG8hcAANgLIhUBBAEG0hcAANgK8hUBBAEHEhcAANgLQ\
|
||||
hUBBAEG8hcAANgLEhUBBAEHMhcAANgLYhUBBAEHEhcAANgLMhUBBAEHUhcAANgLghUBBAEHMhcAANg\
|
||||
LUhUBBAEHchcAANgLohUBBAEHUhcAANgLchUBBAEHkhcAANgLwhUBBAEHchcAANgLkhUBBACAGNgKA\
|
||||
h0BBAEHkhcAANgLshUBBACAIQVhqIgA2AviGQCAGIABBAXI2AgQgCCAGakFcakEoNgIAQQBBgICAAT\
|
||||
YCnIdAC0EAIQFBACgC+IZAIgAgAk0NAEEAIAAgAmsiATYC+IZAQQBBACgCgIdAIgAgAmoiBTYCgIdA\
|
||||
IAUgAUEBcjYCBCAAIAJBA3I2AgQgAEEIag8LIAELzQ4BB38gAEF4aiIBIABBfGooAgAiAkF4cSIAai\
|
||||
EDAkACQCACQQFxDQAgAkEDcUUNASABKAIAIgIgAGohAAJAQQAoAvyGQCABIAJrIgFHDQAgAygCBEED\
|
||||
cUEDRw0BQQAgADYC9IZAIAMgAygCBEF+cTYCBCABIABBAXI2AgQgASAAaiAANgIADwsCQAJAIAJBgA\
|
||||
JJDQAgASgCGCEEAkACQCABKAIMIgUgAUcNACABQRRBECABKAIUIgUbaigCACICDQFBACEFDAMLIAEo\
|
||||
AggiAiAFNgIMIAUgAjYCCAwCCyABQRRqIAFBEGogBRshBgNAIAYhBwJAIAIiBUEUaiIGKAIAIgINAC\
|
||||
AFQRBqIQYgBSgCECECCyACDQALIAdBADYCAAwBCwJAIAFBDGooAgAiBSABQQhqKAIAIgZGDQAgBiAF\
|
||||
NgIMIAUgBjYCCAwCC0EAQQAoAuSDQEF+IAJBA3Z3cTYC5INADAELIARFDQACQAJAIAEo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AhgLIAEgAEEBcjYCBCABIABq\
|
||||
IAA2AgAgAUEAKAL8hkBHDQFBACAANgL0hkAMAgtBACgCnIdAIgIgAE8NAUEAKAKAh0AiAEUNAQJAQQ\
|
||||
AoAviGQCIFQSlJDQBBjIfAACEBA0ACQCABKAIAIgMgAEsNACADIAEoAgRqIABLDQILIAEoAggiAQ0A\
|
||||
CwsCQAJAQQAoApSHQCIADQBB/x8hAQwBC0EAIQEDQCABQQFqIQEgACgCCCIADQALIAFB/x8gAUH/H0\
|
||||
sbIQELQQAgATYCpIdAIAUgAk0NAUEAQX82ApyHQA8LAkACQAJAIABBgAJJDQBBHyEDAkAgAEH///8H\
|
||||
Sw0AIABBBiAAQQh2ZyIDa3ZBAXEgA0EBdGtBPmohAwsgAUIANwIQIAFBHGogAzYCACADQQJ0QfSFwA\
|
||||
BqIQICQAJAAkACQAJAAkBBACgC6INAIgVBASADdCIGcUUNACACKAIAIgUoAgRBeHEgAEcNASAFIQMM\
|
||||
AgtBACAFIAZyNgLog0AgAiABNgIAIAFBGGogAjYCAAwDCyAAQQBBGSADQQF2a0EfcSADQR9GG3QhAg\
|
||||
NAIAUgAkEddkEEcWpBEGoiBigCACIDRQ0CIAJBAXQhAiADIQUgAygCBEF4cSAARw0ACwsgAygCCCIA\
|
||||
IAE2AgwgAyABNgIIIAFBGGpBADYCACABIAM2AgwgASAANgIIDAILIAYgATYCACABQRhqIAU2AgALIA\
|
||||
EgATYCDCABIAE2AggLQQBBACgCpIdAQX9qIgE2AqSHQCABDQNBACgClIdAIgANAUH/HyEBDAILIABB\
|
||||
A3YiA0EDdEHsg8AAaiEAAkACQEEAKALkg0AiAkEBIAN0IgNxRQ0AIAAoAgghAwwBC0EAIAIgA3I2Au\
|
||||
SDQCAAIQMLIAAgATYCCCADIAE2AgwgASAANgIMIAEgAzYCCA8LQQAhAQNAIAFBAWohASAAKAIIIgAN\
|
||||
AAsgAUH/HyABQf8fSxshAQtBACABNgKkh0APCwugDAEGfyAAIAFqIQIC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sgBUEANgIADAILIAIgACADIAEgASADSxsQCBogABABDAQLAkAgCEEMaigCACIDIAhBCGooAgAiAkYN\
|
||||
ACACIAM2AgwgAyACNgIIDAILQQBBACgC5INAQX4gBUEDdndxNgLkg0AMAQsgCUUNAAJAAkAgCCgCHE\
|
||||
ECdEH0hcAAaiIDKAIAIAhGDQAgCUEQQRQgCSgCECAIRhtqIAI2AgAgAkUNAgwBCyADIAI2AgAgAg0A\
|
||||
QQBBACgC6INAQX4gCCgCHHdxNgLog0AMAQsgAiAJNgIYAkAgCCgCECIDRQ0AIAIgAzYCECADIAI2Ah\
|
||||
gLIAgoAhQiA0UNACACQRRqIAM2AgAgAyACNgIYCwJAIAtBEEkNACAEIAQoAgBBAXEgAXJBAnI2AgAg\
|
||||
ByABaiIDIAtBA3I2AgQgAyALQQRyaiICIAIoAgBBAXI2AgAgAyALEAIgAA8LIAQgBCgCAEEBcSAKck\
|
||||
ECcjYCACAHIApBBHJqIgMgAygCAEEBcjYCACAADwsgAxAAIgFFDQAgASAAIANBfEF4IAQoAgAiAkED\
|
||||
cRsgAkF4cWoiAiACIANLGxAIIQMgABABIAMPCyACC/EGAgt/An4jAEEwayICJABBJyEDAkACQCAANQ\
|
||||
IAIg1CkM4AWg0AIA0hDgwBC0EnIQMDQCACQQlqIANqIgBBfGogDUKQzgCAIg5C8LF/fiANfKciBEH/\
|
||||
/wNxQeQAbiIFQQF0QZSBwABqLwAAOwAAIABBfmogBUGcf2wgBGpB//8DcUEBdEGUgcAAai8AADsAAC\
|
||||
ADQXxqIQMgDUL/wdcvViEAIA4hDSAADQALCwJAIA6nIgBB4wBMDQAgAkEJaiADQX5qIgNqIA6nIgRB\
|
||||
//8DcUHkAG4iAEGcf2wgBGpB//8DcUEBdEGUgcAAai8AADsAAAsCQAJAIABBCkgNACACQQlqIANBfm\
|
||||
oiA2ogAEEBdEGUgcAAai8AADsAAAwBCyACQQlqIANBf2oiA2ogAEEwajoAAAtBJyADayEGQQEhAEEr\
|
||||
Q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U+AgAPCyACIAIQDQALYQICfw\
|
||||
J+QQAhAkEAIQNCACEEAkADQCABIANGDQEgACADajEAACIFQv8AgyACQT9xrYYgBIQhBCACQQdqIQIg\
|
||||
A0EBaiEDIAVCgAGDQgBSDQALIAAQASAEpw8LIAEgARANAAtvAQF/IwBBMGsiAiQAIAIgATYCBCACIA\
|
||||
A2AgAgAkEcakECNgIAIAJBLGpBAjYCACACQgI3AgwgAkGEgcAANgIIIAJBAjYCJCACIAJBIGo2Ahgg\
|
||||
AiACNgIoIAIgAkEEajYCICACQQhqQeiCwAAQEgALdQECf0EBIQBBAEEAKALgg0AiAUEBajYC4INAAk\
|
||||
ACQEEAKAKoh0BBAUcNAEEAKAKsh0BBAWohAAwBC0EAQQE2AqiHQAtBACAANgKsh0ACQCABQQBIDQAg\
|
||||
AEECSw0AQQAoAtyDQEF/TA0AIABBAUsNABAbAAsAC1QBAX8CQAJAAkAgAUGAgMQARg0AQQEhAyAAKA\
|
||||
IYIAEgAEEcaigCACgCEBEFAA0BCyACDQFBACEDCyADDwsgACgCGCACQQAgAEEcaigCACgCDBEHAAtH\
|
||||
AQF/IwBBIGsiAyQAIANBFGpBADYCACADQfiCwAA2AhAgA0IBNwIEIAMgATYCHCADIAA2AhggAyADQR\
|
||||
hqNgIAIAMgAhASAAsrAAJAIABBfEsNAAJAIAANAEEEDwsgACAAQX1JQQJ0EAUiAEUNACAADwsACzQB\
|
||||
AX8jAEEQayICJAAgAiABNgIMIAIgADYCCCACQcCAwAA2AgQgAkH4gsAANgIAIAIQFQALHgAgAEEUai\
|
||||
gCABoCQCAAQQRqKAIADgIAAAALEA4ACxoAAkAgAA0AQfiCwABBK0HAg8AAEBAACyAACw4AIAAoAggQ\
|
||||
FCAAEBkACw4AAkAgAUUNACAAEAELCxEAQZyAwABBEUGwgMAAEBAACwsAIAAjAGokACMACwkAIAAgAR\
|
||||
ATAAsMAEKl8JbP5f/ppVYLAwAACwIACwIACwvig4CAAAEAQYCAwAAL2ANsaWJyY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2JlZ2luX3Vud2luZBYPX193YmluZGdlbl9mcmVlFzRhbGxvYzo6cmF3X3ZlYzo6Y2FwYWNpdH\
|
||||
lfb3ZlcmZsb3c6Omg0YjQ5MDE0ODMwY2FmZTYzGB9fX3diaW5kZ2VuX2FkZF90b19zdGFja19wb2lu\
|
||||
dGVyGUlzdGQ6OnN5c19jb21tb246OmJhY2t0cmFjZTo6X19ydXN0X2VuZF9zaG9ydF9iYWNrdHJhY2\
|
||||
U6OmhhMDNhYmVmMDJhOGI3MGZkGjE8VCBhcyBjb3JlOjphbnk6OkFueT46OnR5cGVfaWQ6OmhhMGM0\
|
||||
NDkyMjE2ZDRkMmU3GwpydXN0X3BhbmljHDdzdGQ6OmFsbG9jOjpkZWZhdWx0X2FsbG9jX2Vycm9yX2\
|
||||
hvb2s6OmhmOWMzOTNiYTNjZDI4N2UxHW9jb3JlOjpwdHI6OmRyb3BfaW5fcGxhY2U8JmNvcmU6Oml0\
|
||||
ZXI6OmFkYXB0ZXJzOjpjb3BpZWQ6OkNvcGllZDxjb3JlOjpzbGljZTo6aXRlcjo6SXRlcjx1OD4+Pj\
|
||||
o6aDYzYzJlMTQ5N2I1MmYzZDcA74CAgAAJcHJvZHVjZXJzAghsYW5ndWFnZQEEUnVzdAAMcHJvY2Vz\
|
||||
c2VkLWJ5AwVydXN0Yx0xLjU3LjAgKGYxZWRkMDQyOSAyMDIxLTExLTI5KQZ3YWxydXMGMC4xOS4wDH\
|
||||
dhc20tYmluZGdlbgYwLjIuODA=\
|
||||
",
|
||||
);
|
||||
|
||||
export default data;
|
84
encoding/varint.ts
Normal file
84
encoding/varint.ts
Normal file
@ -0,0 +1,84 @@
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
import * as wasm from "../_wasm_varint/varint.mjs";
|
||||
|
||||
const U32MAX = 4_294_967_295;
|
||||
const U64MAX = 18_446_744_073_709_551_615n;
|
||||
|
||||
/**
|
||||
* Encodes the given `number` into `Uint8Array` with LEB128. The number needs to be in the range of `0` and `0xffffffff`.
|
||||
* ```ts
|
||||
* import { encodeU32 } from "./varint.ts";
|
||||
*
|
||||
* const encodedValue = encodeU32(42);
|
||||
* // Do something with the encoded value
|
||||
* ```
|
||||
*/
|
||||
export function encodeU32(val: number): Uint8Array {
|
||||
if (!Number.isInteger(val)) throw new TypeError("Floats are not supported");
|
||||
if (val < 0) throw new RangeError("Signed integers are not supported");
|
||||
if (val > U32MAX) {
|
||||
throw new RangeError(
|
||||
`The given number exceeds the limit of unsigned integer: ${val}`,
|
||||
);
|
||||
}
|
||||
return wasm.encode_u32(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the given `BigInt` into `Uint8Array` with LEB128. The number needs to be in the range of `0` and `0xffffffffffffffff`.
|
||||
* ```ts
|
||||
* import { encodeU64 } from "./varint.ts";
|
||||
*
|
||||
* const encodedValue = encodeU64(42n);
|
||||
* // Do something with the encoded value
|
||||
* ```
|
||||
*/
|
||||
export function encodeU64(val: bigint): Uint8Array {
|
||||
if (val < 0) throw new RangeError("Signed integers are not supported");
|
||||
if (val > U64MAX) {
|
||||
throw new RangeError(
|
||||
`The given number exceeds the limit of unsigned long integer: ${val}`,
|
||||
);
|
||||
}
|
||||
return wasm.encode_u64(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes the given `Uint8Array` into a `number` with LEB128.
|
||||
* ```ts
|
||||
* import { decodeU32 } from "./varint.ts";
|
||||
* const bytes = Uint8Array.from([221, 199, 1]);
|
||||
* const decodedValue = decodeU32(bytes);
|
||||
*
|
||||
* // Do something with the decoded value
|
||||
* console.log(decodedValue === 25565);
|
||||
* ```
|
||||
*/
|
||||
export function decodeU32(val: Uint8Array): number {
|
||||
if (val.length > 5) throw RangeError("Too many bytes");
|
||||
try {
|
||||
return wasm.decode_u32(val);
|
||||
} catch {
|
||||
throw new RangeError(`Bad varint: ${val}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes the given `Uint8Array` into a `BigInt` with LEB128.
|
||||
* ```ts
|
||||
* import { decodeU64 } from "./varint.ts";
|
||||
* const bytes = Uint8Array.from([221, 199, 1]);
|
||||
* const decodedValue = decodeU64(bytes);
|
||||
*
|
||||
* // Do something with the decoded value
|
||||
* console.log(decodedValue === 25565n);
|
||||
* ```
|
||||
*/
|
||||
export function decodeU64(val: Uint8Array): BigInt {
|
||||
if (val.length > 10) throw RangeError("Too many bytes");
|
||||
try {
|
||||
return wasm.decode_u64(val);
|
||||
} catch {
|
||||
throw new RangeError(`Bad varint: ${val}`);
|
||||
}
|
||||
}
|
103
encoding/varint_test.ts
Normal file
103
encoding/varint_test.ts
Normal file
@ -0,0 +1,103 @@
|
||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
import { decodeU32, decodeU64, encodeU32, encodeU64 } from "./varint.ts";
|
||||
import { assertEquals, assertThrows } from "../testing/asserts.ts";
|
||||
|
||||
const U32MAX = 4_294_967_295;
|
||||
const U64MAX = 18_446_744_073_709_551_615n;
|
||||
|
||||
Deno.test({
|
||||
name: "VarInt encode",
|
||||
fn: function () {
|
||||
assertEquals(encodeU32(0), new Uint8Array([0]));
|
||||
assertEquals(encodeU32(1), new Uint8Array([1]));
|
||||
assertEquals(encodeU32(127), new Uint8Array([127]));
|
||||
assertEquals(encodeU32(128), new Uint8Array([128, 1]));
|
||||
assertEquals(encodeU32(255), new Uint8Array([255, 1]));
|
||||
assertEquals(encodeU32(25565), new Uint8Array([221, 199, 1]));
|
||||
assertEquals(encodeU32(2097151), new Uint8Array([255, 255, 127]));
|
||||
assertEquals(
|
||||
encodeU32(2147483647),
|
||||
new Uint8Array([255, 255, 255, 255, 7]),
|
||||
);
|
||||
|
||||
assertThrows(() => encodeU32(-1), RangeError, "Signed");
|
||||
assertThrows(() => encodeU32(U32MAX + 1), RangeError);
|
||||
assertThrows(() => encodeU32(1.1), TypeError);
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "VarInt decode",
|
||||
fn: function () {
|
||||
assertEquals(decodeU32(new Uint8Array([0])), 0);
|
||||
assertEquals(decodeU32(new Uint8Array([1])), 1);
|
||||
assertEquals(decodeU32(new Uint8Array([127])), 127);
|
||||
assertEquals(decodeU32(new Uint8Array([128, 1])), 128);
|
||||
assertEquals(decodeU32(new Uint8Array([255, 1])), 255);
|
||||
assertEquals(decodeU32(new Uint8Array([221, 199, 1])), 25565);
|
||||
assertEquals(
|
||||
decodeU32(new Uint8Array([255, 255, 127])),
|
||||
2097151,
|
||||
);
|
||||
assertEquals(
|
||||
decodeU32(new Uint8Array([255, 255, 255, 255, 7])),
|
||||
2147483647,
|
||||
);
|
||||
assertThrows(() => decodeU32(new Uint8Array(6)), RangeError, "Too");
|
||||
assertThrows(
|
||||
() => decodeU32(new Uint8Array([255, 255])),
|
||||
RangeError,
|
||||
"Bad",
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "VarLong encode",
|
||||
fn: function () {
|
||||
assertEquals(encodeU64(0n), new Uint8Array([0]));
|
||||
assertEquals(encodeU64(1n), new Uint8Array([1]));
|
||||
assertEquals(encodeU64(2n), new Uint8Array([2]));
|
||||
assertEquals(encodeU64(127n), new Uint8Array([127]));
|
||||
assertEquals(encodeU64(128n), new Uint8Array([128, 1]));
|
||||
assertEquals(encodeU64(255n), new Uint8Array([255, 1]));
|
||||
assertEquals(
|
||||
encodeU64(2147483647n),
|
||||
new Uint8Array([255, 255, 255, 255, 7]),
|
||||
);
|
||||
assertEquals(
|
||||
encodeU64(9223372036854775807n),
|
||||
new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 127]),
|
||||
);
|
||||
assertThrows(() => encodeU64(-1n), RangeError, "Signed");
|
||||
assertThrows(() => encodeU64(U64MAX + 1n), RangeError);
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "VarLong decode",
|
||||
fn: function () {
|
||||
assertEquals(decodeU64(new Uint8Array([0])), 0n);
|
||||
assertEquals(decodeU64(new Uint8Array([1])), 1n);
|
||||
assertEquals(decodeU64(new Uint8Array([2])), 2n);
|
||||
assertEquals(decodeU64(new Uint8Array([127])), 127n);
|
||||
assertEquals(decodeU64(new Uint8Array([128, 1])), 128n);
|
||||
assertEquals(decodeU64(new Uint8Array([255, 1])), 255n);
|
||||
assertEquals(
|
||||
decodeU64(new Uint8Array([255, 255, 255, 255, 7])),
|
||||
2147483647n,
|
||||
);
|
||||
assertEquals(
|
||||
decodeU64(
|
||||
new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 127]),
|
||||
),
|
||||
9223372036854775807n,
|
||||
);
|
||||
assertThrows(() => decodeU32(new Uint8Array(11)), RangeError, "Too");
|
||||
assertThrows(
|
||||
() => decodeU32(new Uint8Array([255, 255])),
|
||||
RangeError,
|
||||
"Bad",
|
||||
);
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user