Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ chrono-tz = "0.8.4"
secrecy = "0.8.0"
lru = "0.16.0"
backon = { version = "1.5.2", features = ["std", "std-blocking-sleep"] }
brotli = "8.0.2"

[dev-dependencies]
assert_cmd = "2.0.11"
Expand Down
4 changes: 0 additions & 4 deletions src/api/data_types/chunking/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ use serde::Deserialize;
pub enum ChunkCompression {
/// GZIP compression (including header)
Gzip = 10,
/// Brotli compression
Brotli = 20,
/// No compression should be applied
#[default]
#[serde(other)]
Expand All @@ -20,7 +18,6 @@ impl ChunkCompression {
match self {
ChunkCompression::Uncompressed => "file",
ChunkCompression::Gzip => "file_gzip",
ChunkCompression::Brotli => "file_brotli",
}
}
}
Expand All @@ -30,7 +27,6 @@ impl fmt::Display for ChunkCompression {
match *self {
ChunkCompression::Uncompressed => write!(f, "uncompressed"),
ChunkCompression::Gzip => write!(f, "gzip"),
ChunkCompression::Brotli => write!(f, "brotli"),
}
}
}
16 changes: 0 additions & 16 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ use std::{fmt, thread};

use anyhow::{Context as _, Result};
use backon::BlockingRetryable as _;
use brotli::enc::BrotliEncoderParams;
use brotli::CompressorWriter;
#[cfg(target_os = "macos")]
use chrono::Duration;
use chrono::{DateTime, FixedOffset, Utc};
Expand Down Expand Up @@ -358,20 +356,6 @@ impl Api {
/// Compresses a file with the given compression.
fn compress(data: &[u8], compression: ChunkCompression) -> Result<Vec<u8>, io::Error> {
Ok(match compression {
ChunkCompression::Brotli => {
let mut encoder = CompressorWriter::with_params(
Vec::new(),
0,
&BrotliEncoderParams {
quality: 6,
..Default::default()
},
);
encoder.write_all(data)?;
encoder.flush()?;
encoder.into_inner()
}

ChunkCompression::Gzip => {
let mut encoder = GzEncoder::new(Vec::new(), Default::default());
encoder.write_all(data)?;
Expand Down