From 0f5d9ab3f41fd6d1f29ae4ed5a4198fc4098b7bd Mon Sep 17 00:00:00 2001 From: clabby Date: Fri, 21 Jun 2024 19:10:20 -0400 Subject: [PATCH] fix(derive): Fjord brotli decompression (#298) ## Overview Fixes Fjord decompression by trimming the type byte off of the compressed data prior to decompression. --- crates/derive/src/stages/channel_reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/derive/src/stages/channel_reader.rs b/crates/derive/src/stages/channel_reader.rs index 64a7c8ca2..4dc1f0f30 100644 --- a/crates/derive/src/stages/channel_reader.rs +++ b/crates/derive/src/stages/channel_reader.rs @@ -171,7 +171,7 @@ impl BatchReader { self.decompressed = decompress_to_vec_zlib(&data).ok()?; } else if compression_type == CHANNEL_VERSION_BROTLI { brotli_used = true; - self.decompressed = decompress_brotli(&data).ok()?; + self.decompressed = decompress_brotli(&data[1..]).ok()?; } else { tracing::error!(target: "batch-reader", "Unsupported compression type: {:x}, skipping batch", compression_type); return None;