enhance: fix exports and extend decoder input type support

This commit is contained in:
2025-03-17 02:01:19 +08:00
parent 34bdb046f0
commit bbc9c86531
5 changed files with 38 additions and 23 deletions

View File

@@ -15,10 +15,10 @@ process.setMaxListeners(Number.POSITIVE_INFINITY);
const createReadStream = (file: string) =>
Readable.toWeb(fs.createReadStream(file), {
strategy: { highWaterMark: 100, size: (chunk) => chunk.byteLength },
}) as ReadableStream<ArrayBuffer>;
}) as ReadableStream<Uint8Array>;
const makeDataStreamTest =
(stream: () => ReadableStream<ArrayBuffer>) =>
(stream: () => ReadableStream<Uint8Array>) =>
async (cb: (tag: EbmlMasterTag | EbmlDataTag, done: () => void) => void) => {
await new Promise((resolve, reject) => {
stream()