mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
23 lines
443 B
Zig
23 lines
443 B
Zig
pub const Encoding = enum {
|
|
identity,
|
|
gzip,
|
|
deflate,
|
|
brotli,
|
|
zstd,
|
|
chunked,
|
|
|
|
pub fn canUseLibDeflate(this: Encoding) bool {
|
|
return switch (this) {
|
|
.gzip, .deflate => true,
|
|
else => false,
|
|
};
|
|
}
|
|
|
|
pub fn isCompressed(this: Encoding) bool {
|
|
return switch (this) {
|
|
.brotli, .gzip, .deflate, .zstd => true,
|
|
else => false,
|
|
};
|
|
}
|
|
};
|