From d3d4c6bfb99ab2fb51261fe253270d99040790fb Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 6 Jun 2024 18:33:09 +0800 Subject: [PATCH] Change chunk size to 64KiB --- utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.ts b/utils.ts index c173179..c53e18e 100644 --- a/utils.ts +++ b/utils.ts @@ -187,7 +187,7 @@ export async function calFileMd5(p: string | URL) { const h = new MD5(); const f = await Deno.open(p); try { - const buf = new Uint8Array(4096); + const buf = new Uint8Array(65536); let readed: number | null = null; do { readed = await f.read(buf); @@ -205,7 +205,7 @@ export async function calFileSha1(p: string | URL) { const h = new SHA1(); const f = await Deno.open(p); try { - const buf = new Uint8Array(4096); + const buf = new Uint8Array(65536); let readed: number | null = null; do { readed = await f.read(buf);