Wow, I guess I finishing writing (for now in Delphi 7) not bad simple pure LZ77-type compressor called notbadlz.
I'm trying to beat zstd at fast levels for sporting interest. I set in my compressor 128K input buffer and 16K cells, here are results:
(zstd-v1.4.4-win64)
Code:
A:\>timer.exe zstd.exe --fast -f --no-progress --single-thread enwik8
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
enwik8 : 51.82% (100000000 => 51817322 bytes, enwik8.zst)
Kernel Time = 0.062 = 00:00:00.062 = 7%
User Time = 0.781 = 00:00:00.781 = 90%
Process Time = 0.843 = 00:00:00.843 = 98%
Global Time = 0.859 = 00:00:00.859 = 100%
***
A:\>timer.exe notbadlz.exe
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Source size 100000000, packed size: 47086177 ratio 0.47086
Done in 1.35210
Kernel Time = 0.078 = 00:00:00.078 = 5%
User Time = 1.359 = 00:00:01.359 = 93%
Process Time = 1.437 = 00:00:01.437 = 98%
Global Time = 1.453 = 00:00:01.453 = 100%
***
A:\>timer.exe zstd.exe -d -f --no-progress --single-thread enwik8.zst -o enwik
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
enwik8.zst : 100000000 bytes
Kernel Time = 0.109 = 00:00:00.109 = 24%
User Time = 0.203 = 00:00:00.203 = 44%
Process Time = 0.312 = 00:00:00.312 = 68%
Global Time = 0.453 = 00:00:00.453 = 100%
A:\>timer notbadlzunp.exe
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
Compressed size: 47086177 Decompressed size: 100000000
Done in 0.52653 sec.
Kernel Time = 0.093 = 00:00:00.093 = 12%
User Time = 0.515 = 00:00:00.515 = 68%
Process Time = 0.609 = 00:00:00.609 = 81%
Global Time = 0.750 = 00:00:00.750 = 100%
With 128K cells and input buffer size = 256 Mb notbadlz compresses enwik8 better than zstd -1. Zstd does it faster, but I have in stock asm 64, prefetch etc. Now I'm thinking whether it's worth porting my program in FASM...