mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
fix(fetch/s3) Handle backpressure when upload large bodies (#20481)
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
This commit is contained in:
22
src/http/Encoding.zig
Normal file
22
src/http/Encoding.zig
Normal file
@@ -0,0 +1,22 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user