Files
bun.sh/src/http/Encoding.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,
};
}
};