From c8e9403d4ae8d3dce7843b2b5f3c66ee264c5d93 Mon Sep 17 00:00:00 2001 From: Little-Wallace Date: Wed, 14 Oct 2020 16:41:14 +0800 Subject: [PATCH] ban compression Signed-off-by: Little-Wallace --- src/log_batch.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/log_batch.rs b/src/log_batch.rs index edd4e32c..da5a9cf7 100644 --- a/src/log_batch.rs +++ b/src/log_batch.rs @@ -591,12 +591,7 @@ where item.encode_to::(&mut vec).unwrap(); } - let compression_type = if vec.len() > COMPRESSION_SIZE { - vec = lz4::encode_block(&vec[HEADER_LEN..], HEADER_LEN, 4); - CompressionType::Lz4 - } else { - CompressionType::None - }; + let compression_type = CompressionType::None; let checksum = crc32(&vec[8..]); vec.encode_u32_le(checksum).unwrap();