summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index eb3da21..916acf0 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1752,6 +1752,15 @@ int LZ4_decompress_safe_doubleDict(const char* source, char* dest, int compresse
(BYTE*)dest-prefixSize, (const BYTE*)dictStart, dictSize);
}
+LZ4_FORCE_INLINE
+int LZ4_decompress_fast_doubleDict(const char* source, char* dest, int originalSize,
+ size_t prefixSize, const void* dictStart, size_t dictSize)
+{
+ return LZ4_decompress_generic(source, dest, 0, originalSize,
+ endOnOutputSize, full, 0, usingExtDict,
+ (BYTE*)dest-prefixSize, (const BYTE*)dictStart, dictSize);
+}
+
/*===== streaming decompression functions =====*/
LZ4_streamDecode_t* LZ4_createStreamDecode(void)
@@ -1831,21 +1840,32 @@ int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch
return result;
}
+LZ4_FORCE_O2_GCC_PPC64LE
int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize)
{
LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse;
int result;
- if (lz4sd->prefixSize == 0 || lz4sd->prefixEnd == (BYTE*)dest) {
+ if (lz4sd->prefixSize == 0) {
+ assert(lz4sd->extDictSize == 0);
result = LZ4_decompress_fast(source, dest, originalSize);
if (result <= 0) return result;
+ lz4sd->prefixSize = originalSize;
+ lz4sd->prefixEnd = (BYTE*)dest + originalSize;
+ } else if (lz4sd->prefixEnd == (BYTE*)dest) {
+ if (lz4sd->prefixSize >= 64 KB - 1 || lz4sd->extDictSize == 0)
+ result = LZ4_decompress_fast(source, dest, originalSize);
+ else
+ result = LZ4_decompress_fast_doubleDict(source, dest, originalSize,
+ lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize);
+ if (result <= 0) return result;
lz4sd->prefixSize += originalSize;
lz4sd->prefixEnd += originalSize;
} else {
lz4sd->extDictSize = lz4sd->prefixSize;
lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize;
result = LZ4_decompress_fast_extDict(source, dest, originalSize,
- (const char*)lz4sd->externalDict, lz4sd->extDictSize);
+ lz4sd->externalDict, lz4sd->extDictSize);
if (result <= 0) return result;
lz4sd->prefixSize = originalSize;
lz4sd->prefixEnd = (BYTE*)dest + originalSize;
ss='column2'>| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f34f7815 Tests: Fix Qt5Autogen test on Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !908 | * | | | | | | | | | | | | Tests: Fix Qt5Autogen test on XcodeBrad King2017-05-302-4/+5 | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the `mocPlugin` project to provide `mocPlugin.xcodeproj` instead of `Project.xcodeproj` so that the `try_compile` project name matches. Also search in the `Debug` subdirectory of the `try_compile` build tree for the resulting binaries, to work with multi-config generators. * | | | | | | | | | | | | CMake Nightly Date StampKitware Robot2017-05-311-1/+1 | |_|/ / / / / / / / / / |/| | | | | | | | | | | * | | | | | | | | | | | Merge topic 'doc-dev-buildbot-lints'Brad King2017-05-301-1/+6 |\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9685d077 Help/dev: Document buildbot lint-iwyu-tidy builder Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !897 | * | | | | | | | | | | Help/dev: Document buildbot lint-iwyu-tidy builderBrad King2017-05-301-1/+6 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builder builds CMake using lint tools but does not run the test suite. Document it for reviewers to request with `Do: test -i lint`. * | | | | | | | | | | | Merge topic 'iwyu-gcc-7.1'Brad King2017-05-301-0/+1 |\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63fdc2f1 IWYU: update mapping for gcc 7.1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !906 | * | | | | | | | | | | IWYU: update mapping for gcc 7.1Daniel Pfeifer2017-05-301-0/+1 | | | | | | | | | | | | * | | | | | | | | | | | Merge topic 'bootstrap-drop-irix'Brad King2017-05-301-28/+0 |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39fc348f bootstrap: remove support for IRIX Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !903 | * | | | | | | | | | | | bootstrap: remove support for IRIXDaniel Pfeifer2017-05-281-28/+0 | | |_|_|_|/ / / / / / / | |/| | | | | | | | | | * | | | | | | | | | | | Merge topic 'libuv-cygwin'Brad King2017-05-302-3/+21 |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a9eaefaa Build with libuv on Cygwin to enable server-mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !901 | * | | | | | | | | | | | Build with libuv on Cygwin to enable server-modeBrad King2017-05-282-3/+21 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With our last update of libuv, Cygwin is now supported. * | | | | | | | | | | | | Merge topic '16917-c-compiler-version-variable-hint'Brad King2017-05-301-0/+4 |\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7a9a1e04 Help: Add a hint about C and C++ compiler version variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !902 | * | | | | | | | | | | | Help: Add a hint about C and C++ compiler version variableGregor Jasny2017-05-281-0/+4 | | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #16917 * | | | | | | | | | | | CMake Nightly Date StampKitware Robot2017-05-301-1/+1 | |_|_|_|_|/ / / / / / |/| | | | | | | | | | * | | | | | | | | | | CMake Nightly Date StampKitware Robot2017-05-291-1/+1 |/ / / / / / / / / / * | | | | | | | | | Merge topic 'sunpro-std-flags'Brad King2017-05-283-6/+11 |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 370d0d25 SunPro: update flags used for CMake itself f1f21e30 SunPro: set -library=stlport as standard compile option for C++98 9316120c SunPro: add standard compile option for C++03 783fbb77 Tests: Compile entire Plugin test with the same language standard Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !879 | * | | | | | | | | | SunPro: update flags used for CMake itselfDaniel Pfeifer2017-05-261-1/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special flags should no longer be required when CMake is built with a recent version of CMake. | * | | | | | | | | | SunPro: set -library=stlport as standard compile option for C++98Daniel Pfeifer2017-05-261-0/+4 | | | | | | | | | | | | * | | | | | | | | | SunPro: add standard compile option for C++03Daniel Pfeifer2017-05-261-2/+2 | | | | | | | | | | | | * | | | | | | | | | Tests: Compile entire Plugin test with the same language standardBrad King2017-05-261-3/+3 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set `CMAKE_CXX_STANDARD` early so that both KWSys and our test code build with the same language standard. This is important on compilers that have incompatible standard libraries. * | | | | | | | | | | Merge topic 'intel-std-flags'Brad King2017-05-282-36/+44 |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc51b92c Intel: avoid variables in language standard flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !894 | * | | | | | | | | | | Intel: avoid variables in language standard flagsDaniel Pfeifer2017-05-262-36/+44 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the bootstrap script, we want to be able to extract language standard flags using sed. Make sure the content of the flag varianbles can be passed unmodified to the compiler. * | | | | | | | | | | | Merge topic 'reduce-string-copying'Brad King2017-05-28