Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Replaced deprecated lz4 function call" #1220

Merged
merged 1 commit into from
Nov 7, 2017
Merged
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: 4 additions & 4 deletions utilities/roslz4/src/lz4s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down