使用 Bun.gzipSync() 方法使用 gzip 压缩 Uint8Array。
const data = Buffer.from("Hello, world!");
const compressed = Bun.gzipSync(data);
// => Uint8Array
const decompressed = Bun.gunzipSync(compressed);
// => Uint8Array
有关更多有用的工具,请参阅 文档 > API > 工具。
使用 Bun.gzipSync() 方法使用 gzip 压缩 Uint8Array。
const data = Buffer.from("Hello, world!");
const compressed = Bun.gzipSync(data);
// => Uint8Array
const decompressed = Bun.gunzipSync(compressed);
// => Uint8Array
有关更多有用的工具,请参阅 文档 > API > 工具。
HTTP
包管理器
将 bun install 与 Artifactory 一起使用
配置 Git 以 diff Bun 的 lockb lockfile
读取文件
运行时
流
将 ReadableStream 转换为 Uint8Array
将 ReadableStream 转换为 ArrayBuffer
将 Node.js Readable 转换为 Uint8Array
实用程序