From f5b795e1b87e6c459a4e9edfcfa4c89c4286d170 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Tue, 7 Nov 2017 08:36:48 -0800 Subject: [PATCH] Revert "Replaced deprecated lz4 function call" This reverts commit a31ddd0cf3df18b360fac4458ba5bbec14e885e3. --- utilities/roslz4/src/lz4s.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/roslz4/src/lz4s.c b/utilities/roslz4/src/lz4s.c index c1299b040f..05f16eabfc 100644 --- a/utilities/roslz4/src/lz4s.c +++ b/utilities/roslz4/src/lz4s.c @@ -181,10 +181,10 @@ int bufferToOutput(roslz4_stream *str) { state->buffer_offset, str->output_left); // Shrink output by 1 to detect if data is not compressible - uint32_t comp_size = LZ4_compress_default(state->buffer, - str->output_next + 4, - (int) state->buffer_offset, - (int) uncomp_size - 1); + uint32_t comp_size = LZ4_compress_limitedOutput(state->buffer, + str->output_next + 4, + (int) state->buffer_offset, + (int) uncomp_size - 1); uint32_t wrote; if (comp_size > 0) { DEBUG("bufferToOutput() Compressed to %i bytes\n", comp_size);