Skip to content

Commit ca6c832

Browse files
committed
Tweaks
1 parent 1faccec commit ca6c832

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/Kanzi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void printHeader(Printer& log, int verbose, bool& showHeader)
269269
log.println(ss.str(), verbose > 0)
270270

271271

272-
bool toInt(string& s, int& res)
272+
static bool toInt(string& s, int& res)
273273
{
274274
// Check that all characters are valid
275275
for (size_t i = 0; i < s.length(); i++) {

src/entropy/TPAQPredictor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ namespace kanzi
422422
_binCount += ((_c4 >> 7) & 1);
423423

424424
// Select Neural Net
425-
_mixer = &_mixers[(_matchLen != 0) ? (_c4 & _mixersMask) + 1 : _c4 & _mixersMask];
425+
_mixer = &_mixers[(_c4 & _mixersMask) | ((_matchLen == 0) ? 0 : 1)];
426426

427427
// Add contexts to NN
428428
_ctx0 = (_c4 & 0xFF) << 8;

0 commit comments

Comments
 (0)