mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 22:58:16 -04:00
Switch to using LZ4_compress_default().
This commit is contained in:
1 parent
f60bd811e9
commit
c7f10de442
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -427,7 +427,7 @@ AH_TEMPLATE([SUPPORT_LZ4],
|
||||
[Undefine if you do not want LZ4 compression. By default this is defined.])
|
||||
if test x"$enable_lz4" != x"no" && test x"$ac_cv_header_lz4_h" = x"yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_SEARCH_LIBS(LZ4_compress, lz4, [AC_DEFINE(SUPPORT_LZ4)])
|
||||
AC_SEARCH_LIBS(LZ4_compress_default, lz4, [AC_DEFINE(SUPPORT_LZ4)])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
@@ -692,7 +692,7 @@ static void send_zstd_token(int f, int32 token, struct map_struct *buf,
|
||||
exit_cleanup(RERR_PROTOCOL);
|
||||
}
|
||||
|
||||
obuf = new_array(char, MAX_DATA_COUNT + 2);
|
||||
obuf = new_array(char, OBUF_SIZE);
|
||||
if (!obuf)
|
||||
out_of_memory("send_deflated_token");
|
||||
|
||||
@@ -946,7 +946,7 @@ send_compressed_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
|
||||
} else
|
||||
available_in /= 2;
|
||||
|
||||
available_out = LZ4_compress(next_in, next_out, available_in);
|
||||
available_out = LZ4_compress_default(next_in, next_out, available_in, size - 2);
|
||||
if (!available_out) {
|
||||
rprintf(FERROR, "compress returned %d\n", available_out);
|
||||
exit_cleanup(RERR_STREAMIO);
|
||||
|
||||
Reference in new issue
Block a user