chore: remove redundant BinaryReader test class (#6068)

This commit is contained in:
Asher Gomez 2024-09-27 13:30:41 +10:00 committed by GitHub
parent 827fe95620
commit fb2e30313a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import type { Reader } from "./types.ts";
export const MIN_READ_BUFFER_SIZE = 16;
export const bufsizes = [
0,
@ -16,21 +14,6 @@ export const bufsizes = [
4096,
];
export class BinaryReader implements Reader {
index = 0;
#bytes: Uint8Array;
constructor(bytes = new Uint8Array(0)) {
this.#bytes = bytes;
}
read(p: Uint8Array): Promise<number | null> {
p.set(this.#bytes.subarray(this.index, p.byteLength));
this.index += p.byteLength;
return Promise.resolve(p.byteLength);
}
}
// N controls how many iterations of certain checks are performed.
const N = 100;