File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ namespace kanzi
303303 uint hashSize = HASH_SIZE ;
304304 uint extraMem = (T == true ) ? 1 : 0 ;
305305 uint bufferSize = BUFFER_SIZE ;
306- uint bsVersion = 6 ;
306+ uint bsVersion = 7 ;
307307
308308 if (ctx != nullptr ) {
309309 // Block size requested by the user
@@ -341,10 +341,12 @@ namespace kanzi
341341 bsVersion = ctx->getInt (" bsVersion" , bsVersion);
342342 }
343343
344- // The ring buffer and hash table use bit masks for indexing.
345- // Normalize their sizes to powers of two before creating the masks.
346- bufferSize = 1u << Global::_log2 (bufferSize);
347- hashSize = 1u << Global::_log2 (hashSize);
344+ if (bsVersion > 6 ) {
345+ // The ring buffer and hash table use bit masks for indexing.
346+ // Normalize their sizes to powers of two before creating the masks.
347+ bufferSize = 1u << Global::_log2 (bufferSize);
348+ hashSize = 1u << Global::_log2 (hashSize);
349+ }
348350
349351 mixersSize <<= (2 * extraMem);
350352 statesSize <<= (2 * extraMem);
You can’t perform that action at this time.
0 commit comments