Skip to content
Merged
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - ReleaseDate

### Fixed

* Switched Lz4 compression to use HTTP standard `Accept-Encoding` negotiation, fixing a regression in ClickHouse 26.9. ([#482], [issue #468])

[#482]: https://github.com/ClickHouse/clickhouse-rs/pull/482

[issue #468]: https://github.com/ClickHouse/clickhouse-rs/issues/468

## [0.15.2] - 2026-08-24

### Added
Expand Down
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ test-util = ["hyper/server"]
inserter = ["dep:quanta"]
uuid = ["dep:uuid"]
time = ["dep:time"]
lz4 = ["dep:lz4_flex", "dep:cityhash-rs"]
lz4 = ["dep:lz4_flex", "dep:cityhash-rs", "dep:twox-hash"]
zstd = ["dep:zstd", "dep:cityhash-rs"]
chrono = ["dep:chrono"]
futures03 = []
Expand Down Expand Up @@ -152,9 +152,8 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [
url = "2.1.1"
futures-util = { version = "0.3.5", default-features = false, features = ["sink", "io"] }
futures-channel = { version = "0.3.30", features = ["sink"] }
lz4_flex = { version = "0.11.6", default-features = false, features = [
"std",
], optional = true }
twox-hash = { version = "2.1.4", optional = true }
lz4_flex = { version = "0.14.0", optional = true, default-features = false, features = ["std"] }
cityhash-rs = { version = "=1.0.1", optional = true } # exact version for safety, this package has been stable for years
zstd = { version = "0.13", default-features = false, optional = true }
uuid = { version = "1", optional = true }
Expand Down
13 changes: 13 additions & 0 deletions src/bytes_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ impl BytesExt {
*self.cursor.get_mut() += n;
}

pub(crate) fn clear(&mut self) {
*self.cursor.get_mut() = 0;
self.bytes.clear();
}

/// Adds the provided chunk into available bytes.
#[inline(always)]
pub(crate) fn extend(&mut self, chunk: Bytes) {
Expand Down Expand Up @@ -79,6 +84,14 @@ impl Buf for BytesExt {
fn advance(&mut self, cnt: usize) {
self.advance(cnt);
}

fn copy_to_bytes(&mut self, len: usize) -> Bytes {
let start = self.cursor.get();
self.advance(len);
let end = self.cursor.get();

self.bytes.slice(start..end)
}
}

#[cfg(test)]
Expand Down
249 changes: 0 additions & 249 deletions src/compression/lz4.rs

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading