Compress raw bytes using LZ4 block compression. Splits input into `block_size` blocks, compresses each independently.
(data: &[u8])
| 33 | /// |
| 34 | /// Splits input into `block_size` blocks, compresses each independently. |
| 35 | pub fn encode(data: &[u8]) -> Vec<u8> { |
| 36 | encode_with_block_size(data, DEFAULT_BLOCK_SIZE) |
| 37 | } |
| 38 | |
| 39 | /// Compress with a custom block size (useful for testing or tuning). |
| 40 | pub fn encode_with_block_size(data: &[u8], block_size: usize) -> Vec<u8> { |