Closed pps83 closed 1 year ago
Have you downloaded the submodules using the command
git submodule update --init
regardless if I downloaded, there is no such option to run all codecs similar to lzbench's -eall
to run all available codecs.
Also, it seems that there is no way to list available coders. I checked my src three, and it seems that all submodules are checked out.
Turbobench is superior to lzbench, support more codecs, more features, better precision, submodule architecture with instant update, c/d memory usage (linux only), specific codec parameters (see lzma), colored screen output with pareto display, several output formats like html... There is no -eall option because it will be too slow and the output will be too long and confusing. You can instead define your own codec groups the turbobench.ini. You can list all included codecs with the options "-l1" and "-l2". This is all described in the help display.
an easy way to test all possible codecs
wrapper script:
I absolutely wasn't able to even test lzturbo.
lzturbo is closed source
Thank you for the script. You can also define those entries in turbobench.ini file. lzturbo is actually not included in turbobench.exe
updated my script
problem: when i select all compression levels, turbobench crashes
$ ./turbobench_all.sh test.tar --all-levels
levels: all
codecs:
+ turbobench -ebrotli,0/brotli,1/brotli,2/brotli,3/brotli,4/brotli,5/brotli,6/brotli,7/brotli,8/brotli,9/brotli,10/brotli,11/bzip2/bzip3/fastlz,1/fastlz,2/flzma2,0/flzma2,1/flzma2,2/flzma2,3/flzma2,4/flzma2,5/flzma2,6/flzma2,7/flzma2,8/flzma2,9/flzma2,10/flzma2,11/bsc,0/bsc,3/bsc,4/bsc,5/bsc,6/bsc,7/bsc,8/bscqlfc,1/bscqlfc,2/libdeflate,1/libdeflate,2/libdeflate,3/libdeflate,4/libdeflate,5/libdeflate,6/libdeflate,7/libdeflate,8/libdeflate,9/libdeflate,12/zpaq,0/zpaq,1/zpaq,2/zpaq,3/zpaq,4/zpaq,5/lz4,0/lz4,1/lz4,9/lz4,10/lz4,11/lz4,12/lz4,16/lzfse/lzham,1/lzham,2/lzham,3/lzham,4/lzlib,1/lzlib,2/lzlib,3/lzlib,4/lzlib,5/lzlib,6/lzlib,7/lzlib,8/lzlib,9/lzma,0/lzma,1/lzma,2/lzma,3/lzma,4/lzma,5/lzma,6/lzma,7/lzma,8/lzma,9/lzo1b,1/lzo1b,9/lzo1b,99/lzo1b,999/lzo1c,1/lzo1c,9/lzo1c,99/lzo1c,999/lzo1f,1/lzo1f,999/lzo1x,1/lzo1x,11/lzo1x,12/lzo1x,15/lzo1x,999/lzo1y,1/lzo1y,999/lzo1z,999/lzo2a,999/lzsa,9/quicklz,1/quicklz,2/quicklz,3/zlib,1/zlib,2/zlib,3/zlib,4/zlib,5/zlib,6/zlib,7/zlib,8/zlib,9/zopfli/zstd,1/zstd,2/zstd,3/zstd,4/zstd,5/zstd,6/zstd,7/zstd,8/zstd,9/zstd,10/zstd,11/zstd,12/zstd,13/zstd,14/zstd,15/zstd,16/zstd,17/zstd,18/zstd,19/zstd,20/zstd,21/zstd,22/zstd,-1/zstd,-2/zstd,-3/zstd,-4/zstd,-5/zstd,-6/zstd,-7/zstd,-8/zstd,-9/zstd,-10/zstd,-11/zstd,-12/zstd,-13/zstd,-14/zstd,-15/zstd,-16/zstd,-17/zstd,-18/zstd,-19/zstd,-20/zstd,-21/zstd,-22/imemcpy/memcpy/oodle,01/oodle,02/oodle,03/oodle,04/oodle,05/oodle,06/oodle,07/oodle,08/oodle,09/oodle,11/oodle,12/oodle,13/oodle,14/oodle,15/oodle,16/oodle,17/oodle,18/oodle,19/oodle,21/oodle,22/oodle,23/oodle,24/oodle,25/oodle,26/oodle,27/oodle,28/oodle,29/oodle,41/oodle,42/oodle,43/oodle,44/oodle,45/oodle,46/oodle,47/oodle,48/oodle,49/oodle,51/oodle,52/oodle,53/oodle,54/oodle,55/oodle,56/oodle,57/oodle,58/oodle,59/oodle,61/oodle,62/oodle,63/oodle,64/oodle,65/oodle,66/oodle,67/oodle,68/oodle,69/oodle,71/oodle,72/oodle,73/oodle,74/oodle,75/oodle,76/oodle,77/oodle,78/oodle,79/oodle,81/oodle,82/oodle,83/oodle,84/oodle,85/oodle,86/oodle,87/oodle,88/oodle,89/oodle,-81/oodle,-82/oodle,-83/oodle,91/oodle,92/oodle,93/oodle,94/oodle,95/oodle,96/oodle,97/oodle,98/oodle,99/oodle,-91/oodle,-92/oodle,-93/oodle,101/oodle,102/oodle,103/oodle,104/oodle,105/oodle,106/oodle,107/oodle,108/oodle,109/oodle,111/oodle,112/oodle,113/oodle,114/oodle,115/oodle,116/oodle,117/oodle,118/oodle,119/oodle,-111/oodle,-112/oodle,-113/oodle,121/oodle,122/oodle,123/oodle,124/oodle,125/oodle,126/oodle,127/oodle,128/oodle,129/oodle,131/oodle,132/oodle,133/oodle,134/oodle,135/oodle,136/oodle,137/oodle,138/oodle,139/TurboRC,1/TurboRC,2/TurboRC,3/TurboRC,4/TurboRC,9/TurboRC,10/TurboRC,12/TurboRC,14/TurboRC,17/TurboRC,20/TurboRC,21/TurboRC,90/zlibh,8/zlibh,9/zlibh,10/zlibh,11/zlibh,12/zlibh,13/zlibh,14/zlibh,15/zlibh,16/zlibh,32/zlibrle/srle,0/srle,8/srle,16/srle,32/srle,64/trle/bscbwt/st,3/st,4/st,5/st,6/st,7/st,8 test.tar
*** buffer overflow detected ***: terminated
Aborted (core dumped)
when i build turbobench with gcc -O0
then i get the error
level '1' for codec 'oodle' not in range [01,02,03,04,05,06,07,08,09,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,-81,-82,-83,91,92,93,94,95,96,97,98,99,-91,-92,-93,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,-111,-112,-113,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139]
Probably the maximum arg length is exceeded. You can group all levels into a single entry. ex. brotli,1,2,3,4,5,6,7,8,9,10,11 instead of brotli,1/brotli,2....
For oodle use the levels: 81-89 for kraken (88 is max.?) 91-99 for memaid 111-119: for selkie 131-139: for leviathan other levels are not in latest oodle library 9.
levels are strings, use 01 instead of 1.
It's no recommanded to use all levels with many codecs, because it will be TOO slow wih large files.
its a bug. minimal repro:
$ turbobench -eoodle,01
level '1' for codec 'oodle' not in range [01,02,03,04,05,06,07,08,09,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,-81,-82,-83,91,92,93,94,95,96,97,98,99,-91,-92,-93,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,-111,-112,-113,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139]
fix:
--- a/turbobench.c
+++ b/turbobench.c
@@ -419,6 +419,13 @@ int plugreg(struct plug *plug, char *cmd, int k, int bsize, int bsizex) {
char *prm = cmd;
int lev = strtol(cmd, &cmd, 10);
+ int lev_str_len = cmd - prm;
+ #define MAX_LEV_STR_LEN 32
+ char lev_str[MAX_LEV_STR_LEN + 1];
+ if (lev_str_len > MAX_LEV_STR_LEN)
+ die("level string is too long");
+ memset(&lev_str, 0, MAX_LEV_STR_LEN + 1);
+ memcpy(&lev_str, prm, lev_str_len);
if(prm == cmd) {
lev = INVLEV;
prm = cempty;
@@ -438,10 +445,9 @@ int plugreg(struct plug *plug, char *cmd, int k, int bsize, int bsizex) {
break;
for(gs = plugs; gs->id >= 0; gs++)
if(gs->codec && !strcasecmp(gs->s, name) ) {
- char s[33],*q;
- sprintf(s,"%d", lev);
+ char *q;
found++;
- if(lev==INVLEV && gs->lev && !gs->lev[0] || gs->lev && (q=strstr(gs->lev, s)) && (q==gs->lev || *(q-1) == ',')) {
+ if(lev==INVLEV && gs->lev && !gs->lev[0] || gs->lev && (q=strstr(gs->lev, lev_str)) && (q==gs->lev || *(q-1) == ',')) {
found++;
plugins(plug, gs, &k, bsize, bsizex, lev, prm);
}
next error:
$ turbobench -ebrotli,0,1,2,3,4,5,6,7,8,9,10,11/bzip2/bzip3/fastlz,1,2/flzma2,0,1,2,3,4,5,6,7,8,9,10,11/bsc,0,3,4,5,6,7,8/bscqlfc,1,2/libdeflate,1,2,3,4,5,6,7,8,9,12/zpaq,0,1,2,3,4,5/lz4,0,1,9,10,11,12,16/lzfse/lzham,1,2,3,4/lzlib,1,2,3,4,5,6,7,8,9/lzma,0,1,2,3,4,5,6,7,8,9/lzo1b,1,9,99,999/lzo1c,1,9,99,999/lzo1f,1,999/lzo1x,1,11,12,15,999/lzo1y,1,999/lzo1z,999/lzo2a,999/lzsa,9/quicklz,1,2,3/zlib,1,2,3,4,5,6,7,8,9/zopfli/zstd,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22/imemcpy/memcpy/fpc,0,8,9,10,11,12,16,32,48,63/vecrc_sh/FastHF/FastAC/oodle,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,27,28,29,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,-81,-82,-83,91,92,93,94,95,96,97,98,99,-91,-92,-93,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,-111,-112,-113,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139/subotin/TurboRC,1,2,3,4,9,10,12,14,17,20,21,90/zlibh,8,9,10,11,12,13,14,15,16,32/zlibrle/srle,0,8,16,32,64/trle/bscbwt/st,3,4,5,6,7,8
Too many codecs specified
quickfix: raise PLUGN to 339 (or more)
next error:
oodle shared library './liboo2corelinux64.so.9' not found.'./liboo2corelinux64.so.9: cannot open shared object file: No such file or directory'
quickfix: move OODLE=1
to this section of makefile:
# Archived codecs and other codecs (manual download)
... and maybe explain how to get oodle, see also https://github.com/AlexP0/HZDMeshTool/blob/main/get_liboo2corelinux64.sh
fix: "library not found" should be a warning (not a fatal error)
If you don't use oodle, then you'll not get a message error. If you specify 300 codecs you must probably wait days before turbobench finish. If a codec crashes then you loose all the results and you must restart turbobench again. Better test in groups like those in turbobench.ini. You don't need any script, just define your codecs in turbobench.ini.
I don't want to spend lot of time fixing corner cases like when too many codecs are specified. This is a benchmark program and not something that will be used in production. Oodle can be obtained by downloading the 22GB UnrealEngine. For windows, just search google with "oo2core_9_win64.dll"
Unlike lzbench, TurboBench is quite useless. Doesn't have an easy way to test all possible codecs to see which one compresses best or decompresses faster.
It absolutely HAS TO HAVE
-eall
mode like lzbench. I absolutely wasn't able to even test lzturbo.