mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
start of recording
This commit is contained in:
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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user