start of recording

This commit is contained in:
tresabhi committed 2026-08-11 20:11:12 -05:00
1 parent b3e439669b
commit 8dc9a6b46d
3 files changed
+29 -4

No files matched your search

@@ -1,3 +1,5 @@
import { decompress } from "lz4js";
export class IdArray {
constructor(
private array: Uint32Array = new Uint32Array(),
@@ -57,6 +59,11 @@ export class IdArray {
return new IdArray(uintArray, size);
}
static fromCompressed(bytes: Uint8Array) {
const decompressed = decompress(bytes);
return this.fromBytes(decompressed);
}
static fromArray(array: number[]) {
const uintArray = new Uint32Array(this.nextPowerOf2(array.length));