summaryrefslogtreecommitdiff
path: root/mfbt/Compression.cpp
diff options
context:
space:
mode:
authorRyan VanderMeulen <ryanvm@gmail.com>2017-09-13 09:43:00 -0400
committerwolfbeast <mcwerewolf@gmail.com>2018-03-14 11:05:16 +0100
commitbd8d050f59778d08865fa2cfff8e2f00a6ae3e76 (patch)
tree3a3c1aab05e16fc51ed516c9c71e199857f76737 /mfbt/Compression.cpp
parent513d379866a430ec891d6dd2e9fc507caef62a59 (diff)
downloadaura-central-bd8d050f59778d08865fa2cfff8e2f00a6ae3e76.tar.gz
Bug 1398021 - Update lz4 to version 1.8.0. r=froydnj, a=RyanVM
--HG-- extra : source : 9a4077eda5d80e2f7c7fe271035bee2e2d034cec extra : histedit_source : 64eb1f6e9b2b08981644d7edccd22997d6463b4b%2C5619daf512a89b3a6bf84eca781190b56e8dea31
Diffstat (limited to 'mfbt/Compression.cpp')
-rw-r--r--mfbt/Compression.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/mfbt/Compression.cpp b/mfbt/Compression.cpp
index c114c6c0f..6be8020a9 100644
--- a/mfbt/Compression.cpp
+++ b/mfbt/Compression.cpp
@@ -16,8 +16,12 @@ using namespace mozilla::Compression;
namespace {
+extern "C" {
+
#include "lz4.c"
+}
+
}/* anonymous namespace */
/* Our wrappers */
@@ -27,7 +31,8 @@ LZ4::compress(const char* aSource, size_t aInputSize, char* aDest)
{
CheckedInt<int> inputSizeChecked = aInputSize;
MOZ_ASSERT(inputSizeChecked.isValid());
- return LZ4_compress(aSource, aDest, inputSizeChecked.value());
+ return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(),
+ LZ4_compressBound(inputSizeChecked.value()));
}
size_t
@@ -38,8 +43,8 @@ LZ4::compressLimitedOutput(const char* aSource, size_t aInputSize, char* aDest,
MOZ_ASSERT(inputSizeChecked.isValid());
CheckedInt<int> maxOutputSizeChecked = aMaxOutputSize;
MOZ_ASSERT(maxOutputSizeChecked.isValid());
- return LZ4_compress_limitedOutput(aSource, aDest, inputSizeChecked.value(),
- maxOutputSizeChecked.value());
+ return LZ4_compress_default(aSource, aDest, inputSizeChecked.value(),
+ maxOutputSizeChecked.value());
}
bool