mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-03 03:41:42 +08:00
Change chunk size to 64KiB
This commit is contained in:
4
utils.ts
4
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);
|
||||
|
||||
Reference in New Issue
Block a user