From c9c61b9b5efd97301c267ea189ee1c3b8440da8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 16:53:35 +0100 Subject: Merging upstream version 1.4~pre1. Signed-off-by: Daniel Baumann --- compress.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'compress.cc') 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 ) -- cgit v1.2.3