Options for creating an Archive instance.
By default, archives are not compressed. Use { compress: "gzip" } to enable compression.
Search the reference...
/
interface
Options for creating an Archive instance.
By default, archives are not compressed. Use { compress: "gzip" } to enable compression.
// No compression (default)
new Bun.Archive(data);
// Enable gzip with default level (6)
new Bun.Archive(data, { compress: "gzip" });
// Specify compression level
new Bun.Archive(data, { compress: "gzip", level: 9 });
Compression algorithm to use. Currently only "gzip" is supported. If not specified, no compression is applied.
Compression level (1-12). Only applies when compress is set.
1: Fastest compression, lowest ratio6: Default balance of speed and ratio12: Best compression ratio, slowestResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →