diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 15:53:35 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 15:53:35 +0000 |
commit | c9c61b9b5efd97301c267ea189ee1c3b8440da8f (patch) | |
tree | e6ff3af747cb7906fe694fdf0e0c5b63edf6e000 /compress.cc | |
parent | Adding debian version 1.3-1. (diff) | |
download | plzip-c9c61b9b5efd97301c267ea189ee1c3b8440da8f.tar.xz plzip-c9c61b9b5efd97301c267ea189ee1c3b8440da8f.zip |
Merging upstream version 1.4~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | compress.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compress.cc b/compress.cc index 4e32b87..424e090 100644 --- a/compress.cc +++ b/compress.cc @@ -375,8 +375,11 @@ extern "C" void * cworker( void * arg ) Packet * const packet = courier.distribute_packet(); if( !packet ) break; // no more packets to process - const int dict_size = std::max( LZ_min_dictionary_size(), - std::min( dictionary_size, packet->size ) ); + int dict_size; + if( dictionary_size == 65535 && match_len_limit == 16 ) + dict_size = dictionary_size; + else dict_size = std::max( LZ_min_dictionary_size(), + std::min( dictionary_size, packet->size ) ); LZ_Encoder * const encoder = LZ_compress_open( dict_size, match_len_limit, LLONG_MAX ); if( !encoder || LZ_compress_errno( encoder ) != LZ_ok ) |