summaryrefslogtreecommitdiffstats
path: root/compress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compress.cc')
-rw-r--r--compress.cc7
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 )