From ea11923550802a3eeebe81f2cc4a9a44cda32121 Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 8 Dec 2015 16:33:10 -0800 Subject: [PATCH] Upgrade to ZSTD 0.4.2 Summary: Change to call the new compression function. Test Plan: build and run db_bench with the compression to make sure it compresses. Reviewers: anthony, rven, kradhakrishnan, IslamAbdelRahman, igor, yhchiang Reviewed By: yhchiang Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D51603 --- build_tools/fbcode_config.sh | 6 +++--- util/compression.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build_tools/fbcode_config.sh b/build_tools/fbcode_config.sh index d6c7b2a28..6046ff357 100644 --- a/build_tools/fbcode_config.sh +++ b/build_tools/fbcode_config.sh @@ -43,9 +43,9 @@ if test -z $PIC_BUILD; then LZ4_LIBS=" /mnt/gvfs/third-party2/lz4/79d2943e2dd7208a3e0b06cf95e9f85f05fe9e1b/r124/gcc-4.9-glibc-2.20/4230243/lib/liblz4.a" CFLAGS+=" -DLZ4" - ZSTD_REV=8df2d01673ae6afcc8c8d16fec862b2d67ecc1e9 - ZSTD_INCLUDE=" -I /mnt/gvfs/third-party2/zstd/$ZSTD_REV/0.1.1/gcc-4.8.1-glibc-2.17/c3f970a/include" - ZSTD_LIBS=" /mnt/gvfs/third-party2/zstd/$ZSTD_REV/0.1.1/gcc-4.8.1-glibc-2.17/c3f970a/lib/libzstd.a" + ZSTD_REV=810b81b4705def5243e998b54701f3c504e4009e + ZSTD_INCLUDE=" -I /mnt/gvfs/third-party2/zstd/$ZSTD_REV/0.4.2/gcc-4.8.1-glibc-2.17/c3f970a/include" + ZSTD_LIBS=" /mnt/gvfs/third-party2/zstd/$ZSTD_REV/0.4.2/gcc-4.8.1-glibc-2.17/c3f970a/lib/libzstd.a" CFLAGS+=" -DZSTD" fi diff --git a/util/compression.h b/util/compression.h index dd4d0135f..954c43dbe 100644 --- a/util/compression.h +++ b/util/compression.h @@ -620,7 +620,7 @@ inline bool ZSTD_Compress(const CompressionOptions& opts, const char* input, size_t compressBound = ZSTD_compressBound(length); output->resize(static_cast(output_header_len + compressBound)); size_t outlen = ZSTD_compress(&(*output)[output_header_len], compressBound, - input, length); + input, length, 1 /* level */); if (outlen == 0) { return false; }