mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-12 02:43:55 +00:00
replace NodeJS buffer with Uint8Array
This commit is contained in:
+1
-1
@@ -2,5 +2,5 @@ export interface Chunk {
|
||||
id?: number;
|
||||
has_subchunks?: boolean;
|
||||
data_len?: number;
|
||||
chunk_data?: Buffer;
|
||||
chunk_data?: Uint8Array;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export class Tracker {
|
||||
}
|
||||
|
||||
getDataChunk() {
|
||||
const fieldChunks: Buffer[] = [];
|
||||
const fieldChunks: Uint8Array[] = [];
|
||||
|
||||
if (this.pos) {
|
||||
fieldChunks.push(dataTrackerPosChunk(...this.pos));
|
||||
|
||||
Reference in New Issue
Block a user