diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-06-09 01:42:39 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-06-09 01:42:39 (GMT) |
commit | 598bde9a6914287686693013424ec4edf0433992 (patch) | |
tree | bafb60a04fc50db4d76dfd1362d9e75d86fdb41c /lz4.c | |
parent | a79180f51dd2dbafca11588008116d288eca11f5 (diff) | |
download | lz4-598bde9a6914287686693013424ec4edf0433992.zip lz4-598bde9a6914287686693013424ec4edf0433992.tar.gz lz4-598bde9a6914287686693013424ec4edf0433992.tar.bz2 |
converge towards LZ4_compress_continue()
Diffstat (limited to 'lz4.c')
-rwxr-xr-x | lz4.c | 53 |
1 files changed, 0 insertions, 53 deletions
@@ -751,59 +751,6 @@ void LZ4_renormDictT(LZ4_dict_t_internal* LZ4_dict, const BYTE* src) } -int LZ4_compress_usingDict (void* LZ4_dict, const char* source, char* dest, int inputSize) -{ - LZ4_dict_t_internal* streamPtr = (LZ4_dict_t_internal*)LZ4_dict; - const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; - - const BYTE* smallest = dictEnd; - if (smallest > (const BYTE*) source) smallest = (const BYTE*) source; - LZ4_renormDictT((LZ4_dict_t_internal*)LZ4_dict, smallest); - - if (dictEnd == (const BYTE*)source) - { - int result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, 0, notLimited, byU32, withPrefix64k); - streamPtr->dictSize += (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; - return result; - } - - { - int result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, 0, notLimited, byU32, usingExtDict); - streamPtr->dictionary = (const BYTE*)source; - streamPtr->dictSize = (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; - return result; - } -} - -int LZ4_compress_limitedOutput_usingDict (void* LZ4_dict, const char* source, char* dest, int inputSize, int maxOutputSize) -{ - LZ4_dict_t_internal* streamPtr = (LZ4_dict_t_internal*)LZ4_dict; - const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; - - const BYTE* smallest = dictEnd; - if (smallest > (const BYTE*) source) smallest = (const BYTE*) source; - LZ4_renormDictT((LZ4_dict_t_internal*)LZ4_dict, smallest); - - if (dictEnd == (const BYTE*)source) - { - int result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k); - streamPtr->dictSize += (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; - return result; - } - - { - int result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict); - streamPtr->dictionary = (const BYTE*)source; - streamPtr->dictSize = (U32)inputSize; - streamPtr->currentOffset += (U32)inputSize; - return result; - } -} - - int LZ4_compress_continue (void* LZ4_stream, const char* source, char* dest, int inputSize) { LZ4_dict_t_internal* streamPtr = (LZ4_dict_t_internal*)LZ4_stream; |