Skip to content
/ qbp Public

Simple LZSS+RLE+RC32 compression algorithm realization (C/C++/Rust).

License

Notifications You must be signed in to change notification settings

asimba/qbp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qbp

Simple LZSS+RLE+RC32 compression algorithm realization.

Internal parameters
Sliding window size (bytes) 65536
Window buffer size (bytes) 259
Minimum match length 4
Maximum match length 259
Memory requirements (encoding algorithm, bytes) ~721483
Memory requirements (decoding algorithm, bytes) ~197133
Range coder type byte-oriented, mixed order (0/1)
Input buffer size (bytes) 65536
Output buffer size (bytes) 65536

Usage : ./qbp <OPTIONS> <SOURCE> <DESTINATION>
Usage : ./lz16 <OPTIONS> <SOURCE> <DESTINATION>
Examples:

qbp c source_file packed_file  
qbp d packed_file unpacked_file  
lz16 c source_file packed_file  
lz16 d packed_file unpacked_file  
unqbp packed_file unpacked_file  
unlz16 packed_file unpacked_file  

Options:

Option Value
c compress data
d decompress data

This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Written by Alexey V. Simbarsky.


Test results (direct link to qbp result):

Source file enwik9
Source size (bytes) 1000000000
Source hash (SHA1) 2996e86fb978f93cca8f566cc56998923e7fe581
Testing platform Intel Core i7 9700K / 32 GB RAM / Windows 10 Pro
Packer Options Resulting size (bytes) Packing time (sec) Unpacking time (sec)
mcm (0.85)
(by Mathieu Chartier)
-x11 139343403 942,72 938,02
tangelo (1.0)
(by Matt Mahoney,Jan Ondrus)
c 156355536 7472,22 7549,93
zcm (0.93)
(by Nania Francesco Antonio)
a -t1 -s -m8 159135549 295,03 297,55
bcm (2.03)
(by Ilya Muravyov)
-b1000x- -t1 163646387 105,74 68,09
zpaq (7.15)
(by Matt Mahoney)
a -m5 -t1 168590740 2472,30 2519,52
lrzip (0.651)
(by Con Kolivas)
-z -p 1 -L 9 -U 169357574 1967,30 1991,57
rz (1.03.7)
(by Christian Martelock)
a -d 1023M 173041178 3070,63 14,31
nanozip (0.09a)
(by Sami Runsas)
a -p1 -cO -m512m 178225148 56,31 28,93
freearc (0.51)
(by Bulat Ziganshin)
a -mx 185153701 219,45 187,81
freearc (0.666)
(by Bulat Ziganshin)
a -mt1 -mx 189696374 210,74 182,99
bsc (3.3.2)
(by Ilya Grebnov)
e -b2047 -m8 -cf -e2 -H28 -M4 -t -T 194367010 76,06 153,76
lzip (1.23)
(Lzip home page)
-k -9 -s29 199138993 1134,42 20,09
lzham (alpha 7 r1)
(by Rich Geldreich)
-m4 -d29 -t0 -x -o -e c 199611734 4164,14 6,42
ybs (0.03f)
(by Vadim Yoockin)
-m16m 202110510 314,00 138,69
csarc (3.3)
(by Siyuan Fu)
a -m5 -d1024m -t1 203995004 491,60 16,07
nlzm (1.03)
(by Nauful)
-window:28 c 206548024 1966,19 9,38
uharc (0.6b)
(by Uwe Herklotz)
a -d0 -md32768 -mm+ -mx 208026696 493,92 383,33
rk (1.04.1a)
(by Malcolm Taylor)
-mx 208096232 1380,00 1372,69
grzipii (0.2.4)
(by Ilya Grebnov)
e -b8m -m1 208993966 108,79 109,66
xz (5.2.9)
(XZ Utils home page)
-9 -e 211776220 871,57 13,38
7z (22.01)
(by Igor Pavlov)
a -t7z -ms=on -m0=LZMA2 -mx9 -mmt=1 -scsUTF-8 -ssc 213323101 690,12 8,50
boa (0.58b)
(by Ian Sutton)
-a -s -m15 213845481 1758,10 1926,75
flashzip (1.1.3)
(by Nania Francesco Antonio)
a -t1 -s -mx3 -k7 -b32 213919392 152,78 35,27
zstd (1.5.2)
(Zstandard GitHub home page)
--ultra -22 --no-progress --single-thread 214910502 794,37 2,75
dark (0.51)
(by Dmitry Malyshev)
p -b16mi0 218507990 97,00 98,09
brotli (1.0.9)
(by Google)
-Z -n 223345718 2287,31 3,36
sbc (0.969b)
(by Sami J. Makinen)
c -m3 -b5 -os -hn 224017402 291,50 104,75
alzip (12.16.0.2)
(by ESTsoft)
-a -s -m3 227906109 754,58 15,88
rar (6.11)
(by Alexander Roshal)
a -s -k -m5 -mt1 -md1g 232248528 811,92 5,64
szip (1.11b)
(by Michael Schindler)
-b41 -o6 232346611 79,50 88,43
balz (1.50)
(by Ilya Muravyov)
cx 241575273 1059,91 33,53
zzip (0.36c)
(by Damien Debin)
a -a -mx -mm 244746544 174,98 94,90
squeez (6.0)
(by Sven Ritter)
a /mx /fmt sqx 246152882 597,93 8,89
makecab/expand (5.0.1.1)
(by Microsoft Corporation)
/D CompressionType=LZX /D CompressionMemory=21 250764075 539,68 4,90
sr3a
(by Matt Mahoney, Nania Francesco Antonio)
c 253031977 55,95 67,09
rzip (2.1)
(by Andrew Tridgell)
-9 -k 253920811 113,04 56,55
bzip2 (1.0.8)
(bzip2 home page)
-9 253977891 81,44 40,03
imp (1.12)
(by Technelysium Pty Ltd.)
a -g -2 -mm 256861382 77,49 21,71
squid (0.03)
(by Ilya Muravyov)
cx 269347430 65,66 34,37
irolz
(by Andrew Polar)
e 273786077 130,22 55,95
crush (1.00)
(by Ilya Muravyov)
cx 279491430 1812,58 7,96
arhangel (1.40)
(by George Lyapko)
a -mzf -mm -c31900 -1 -2 284775209 584,47 400,50
lzpx (1.5b)
(by Ilya Muravyov)
e 285234480 49,47 46,37
ha (0.999c)
(by Harri Hirvola)
a2 285739328 278,29 285,12
jar (1.02)
(by ARJ Software)
a -m4 288825883 179,01 60,11
lizard (1.0.0)
(by Y.Collet, P.Skibinski)
-49 -BD --no-frame-crc 289266199 574,45 8,97
7z (22.01)
(by Igor Pavlov)
a -tzip -m0=Deflate64 -mx9 298494477 861,46 6,26
ace (1.2b)
(by Marcel Lemke)
a -s -d512 -m5 298687158 173,79 8,24
winzip (27.0)
(using wzzip/wzunzip, limited to single thread)
(by Alludo)
-a -ee 298774317 456,93 8,33
zhuff (0.99b)
(by Yann Collet)
-c2t1s 308234163 34,38 1,54
brieflz (1.3.0)
(by Joergen Ibsen)
--optimal 308781584 221,49 4,71
zopfli (1.0.3)
(by Google)
309578152 2508,81
hap/pah (3.00)
(by Harald Feldmann)
309615837 440,31 466,25
rar (2.50)
(by Alexander Roshal)
a -s -m5 309827109 196,01 38,05
kzip
(by Ken Silverman)
/q /s0 310281906 2181,83
7z (22.01)
(by Igor Pavlov)
a -tzip -m0=Deflate -mx9 310706257 790,08 6,54
yzenc/yzdec (1.06.1)
(by BinaryTechnology)
312789435 48,74 23,86
lha (1.14i)
(by Tsugio Okamoto, Koji Arai)
a -o7 312912781 113,52 10,46
uc2 (uc2 3 pro)
(by Ad Infinitum Programs (AIP-NL))
a -tt 313795096 256,12 41,40
thor (0.96a)
(Oscar Garcia)
e4 314092324 26,36 9,73
$\textcolor[RGB]{0,154,23}{\textbf{qbp}}$
(built with "gcc -O3")
$\textcolor[RGB]{0,154,23}{\textbf{c}}$ $\textcolor[RGB]{0,154,23}{\textbf{317542161}}$ $\textcolor[RGB]{0,154,23}{\textbf{45,56}}$ $\textcolor[RGB]{0,154,23}{\textbf{29,46}}$
$\textcolor[RGB]{0,154,23}{\textbf{unqbp}}$
(built with "gcc -O3")
$\textcolor[RGB]{0,154,23}{\textbf{317542161}}$ $\textcolor[RGB]{0,154,23}{\textbf{30,20}}$
lzfse (1.0)
(LZFSE home page)
-encode 319756993 25,34 9,67
limit (1.2)
(by J.Y. Lim)
a -mx 320342601 138,10 38,25
sqz (1.08.3)
(by Jonas I. Hammarberg)
-q0 -m4 322400393 195,15 42,25
gzip (1.12)
(GNU Gzip home page)
-9 322591995 49,25 8,73
info-zip (3.0)
(using zip/unzip)
-9 322592221 46,73 6,61
pkzip (2.50b)
(by PKWARE)
/add 323645288 32,94 7,04
makecab/expand (5.0.1.1)
(by Microsoft Corporation)
324125809 57,91 5,81
ain (2.32)
(by Transas Marine (UK) Ltd.)
a /m1 324538744 90,10 28,51
quark (1.06)
(by Robert Kunz)
a 325196497 177,25 97,30
arj32 (3.20)
(by ARJ Software)
a -m1 328536964 67,71 9,25
ar
(by Haruhiko Okumura)
a 353022236 514,50 59,71
zoo (2.10)
(source)
ah 353022373 104,18 30,69
ulz (1.02b)
(by Ilya Muravyov)
c9 360342071 45,76 1,18
lzop (1.04)
(LZO home page)
-9 -F 366349786 105,33 3,31
hyper (2.6)
(by Klaus Peter Nischke, Peter Sawatzki)
-a 368163826 126,25 96,10
lz4 (1.9.4)
(LZ4 home page)
--best 372443347 65,90 11,91
lzss (0.02)
(by Ilya Muravyov)
cx 380192378 146,15 3,37
lzari
(reference realization by Haruhiko Okumura)
e 388521578 182,69 77,72
$\textcolor[RGB]{0,154,23}{\textbf{lz16}}$
(built with "gcc -O3")
$\textcolor[RGB]{0,154,23}{\textbf{c}}$ $\textcolor[RGB]{0,154,23}{\textbf{407180647}}$ $\textcolor[RGB]{0,154,23}{\textbf{31,50}}$ $\textcolor[RGB]{0,154,23}{\textbf{3,86}}$
$\textcolor[RGB]{0,154,23}{\textbf{unlz16}}$
(built with "gcc -O3")
$\textcolor[RGB]{0,154,23}{\textbf{407180647}}$ $\textcolor[RGB]{0,154,23}{\textbf{3,86}}$
qpress (1.1)
(by Lasse Reinhold)
-L3T1i 422626641 41,11 8,25
ncompress (5.1)
(by Mike Frysinger)
448136005 31,98 12,85
larc (3.33)
(by Haruhiko Okumura, Kazuhiko Miki)
a 455245358 214,15 36,23
lzss
(reference realization by Haruhiko Okumura)
e 455245327 136,39 36,33
shrinker
(by Siyuan Fu)
c 459825318 4,76 1,74
context compressor
(by Maxim Smirnov)
c 478467738 55,85 90,64
carryless rangecoder
(reference algorithm by Dmitry Subbotin with the order-1 frequency model)
480296513 28,12
rangecoder (1.3)
(reference realization by Michael Schindler)
comp1/decomp1 489741259 44,36 53,35
flzp (1.0)
(by Matt Mahoney)
c 497535428 74,15 16,34
lz4 (1.9.4)
(LZ4 home page)
-1 509454838 10,07 8,97
fpaqc
(by Matt Mahoney)
c 620278358 112,53 89,40
fpaqb (2)
(by Matt Mahoney)
c 620278361 116,20 81,57
q-coder
(realization by Dmitry Mastrukov)
e 635523992 109,20 118,21
fpc
(by Konstantinos Agiannis)
-b 0 635922910 9,21 2,12
fpaq0
(by Matt Mahoney)
c 641421110 95,09 122,44
rangecoder (1.3)
(reference realization by Michael Schindler)
comp/decomp 644426106 48,38 57,54
tinylzp (0.1)
(by David Catt)
c 694274932 12,44 8,73
arc (5.21)
(source)
a 886038366 38,49 20,50