diff options
author | Yann Collet <cyan@fb.com> | 2017-11-08 01:37:31 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2017-11-08 01:37:31 (GMT) |
commit | 897f5e9834ed4e8b4e34380b12a6b9e7b911af90 (patch) | |
tree | a0b46f03de54c2ad7ec05c01fdf73f972e4c04a0 /lib/lz4opt.h | |
parent | 71fd08c17daa3deee0c2c3c64c8f009729055bad (diff) | |
download | lz4-897f5e9834ed4e8b4e34380b12a6b9e7b911af90.zip lz4-897f5e9834ed4e8b4e34380b12a6b9e7b911af90.tar.gz lz4-897f5e9834ed4e8b4e34380b12a6b9e7b911af90.tar.bz2 |
removed the ip++ at the beginning of block
The first byte used to be skipped
to avoid a infinite self-comparison.
This is no longer necessary, since init() ensures that index starts at 64K.
The first byte is also useless to search when each block is independent,
but it's no longer the case when blocks are linked.
Removing the first-byte-skip saves
about 10 bytes / MB on files compressed with -BD4 (linked blocks 64Kb),
which feels correct as each MB has 16 blocks of 64KB.
Diffstat (limited to 'lib/lz4opt.h')
-rw-r--r-- | lib/lz4opt.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/lz4opt.h b/lib/lz4opt.h index dd22b7a..03ab825 100644 --- a/lib/lz4opt.h +++ b/lib/lz4opt.h @@ -127,7 +127,6 @@ static int LZ4HC_compress_optimal ( /* init */ DEBUGLOG(5, "LZ4HC_compress_optimal"); if (sufficient_len >= LZ4_OPT_NUM) sufficient_len = LZ4_OPT_NUM-1; - ip++; /* Main Loop */ assert(ip - anchor < LZ4_MAX_INPUT_SIZE); |