Replace buffer.slice() with buffer.subarray()

This commit is contained in:
Fedor Indutny
2025-06-09 14:37:30 -07:00
committed by GitHub
parent 4a6e2d297b
commit b0634f9a9d
19 changed files with 54 additions and 45 deletions

View File

@@ -32,7 +32,7 @@ export class FileStream extends InputStream {
this.#position
);
this.#position += bytesRead;
return this.#buffer.slice(0, bytesRead);
return this.#buffer.subarray(0, bytesRead);
}
async skip(amount: number): Promise<void> {