我正在尝试下载一个 10GB 的文件,但只有 4GB 被保存到磁盘,并且内存增长了很多。
const res = await fetch('https://speed.hetzner.de/10GB.bin');
const file = await Deno.open('./10gb.bin', { create: true, write: true })
const ab = new Uint8Array(await res.arrayBuffer())
await Deno.writeAll(file, ab)
Run Code Online (Sandbox Code Playgroud)