summaryrefslogtreecommitdiffstats
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
commit686954ea845a7b05a8bdb8d2ed9a002a88e698e6 (patch)
tree3a3c1aab05e16fc51ed516c9c71e199857f76737 /mfbt/Compression.cpp
parent879619491f79870170abb0d398ab6a5c506984b0 (diff)
downloadUXP-686954ea845a7b05a8bdb8d2ed9a002a88e698e6.tar
UXP-686954ea845a7b05a8bdb8d2ed9a002a88e698e6.tar.gz
UXP-686954ea845a7b05a8bdb8d2ed9a002a88e698e6.tar.lz
UXP-686954ea845a7b05a8bdb8d2ed9a002a88e698e6.tar.xz
UXP-686954ea845a7b05a8bdb8d2ed9a002a88e698e6.zip
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