replace NodeJS buffer with Uint8Array

This commit is contained in:
2024-10-23 16:38:16 -05:00
parent 90e1bd09a0
commit 4eaedcdfaa
34 changed files with 235 additions and 113 deletions
+1 -1
View File
@@ -2,5 +2,5 @@ export interface Chunk {
id?: number;
has_subchunks?: boolean;
data_len?: number;
chunk_data?: Buffer;
chunk_data?: Uint8Array;
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Chunk } from '../chunk';
export interface DataTrackerFieldChunk extends Chunk {
[key: string]: number | bigint | number[] | Buffer | undefined | boolean;
[key: string]: number | bigint | number[] | Uint8Array | undefined | boolean;
}
+1 -1
View File
@@ -61,7 +61,7 @@ export class Tracker {
}
getDataChunk() {
const fieldChunks: Buffer[] = [];
const fieldChunks: Uint8Array[] = [];
if (this.pos) {
fieldChunks.push(dataTrackerPosChunk(...this.pos));