Saukav is a generalization algorithm from zx7b. Basically is for advanced users, because the decompression routine is generated by the compressor. When you compress a file with saukav.exe, a file called d.asm is generated with the decompression code. For this reason is recommended to process multiple files in the same command line call. All these files will be compressed with the same variant. This generalization contains 2*9*2= 36 different compression codings, each one can be speed optimized with 5 variants, so a total of 180 decompression routines are available. The first parameter is the flow. Can be backward or forward. It's important for pass the parameters in the routine call. For example if we hava a compressed buffer at $8000 with lenght $1000 and uncompressed buffer at $4000 with lenght $1b00, we have this code is flow is forward: ld hl, $8000 ld de, $4000 call sauk And this one is flow is backward: ld hl, $8fff ld de, $5aff call sauk The second parameter is the optimization speed. It's a number between 0 and 4. It doesn't affect to the compression algorithm. It's only for the size of the decompressor and the decompression speed. Lower values means shorter and slower decompression routine. Higher values accelerate the speed but with a bigger decompressor. The third parameter is offset encoding. It's a number between 0 and 8. It fixes the window size for LZ77 algorithm. The generated window is between 256 and 32896 bytes following this formula: window size= 2^(offset+7)+128. Lower values generally are better for small files and higher values for big files. The fourth parameter is the gamma function. It's a number between 0 and 1. Basically you choose between 2 different gamma functions. This function is a fixed huffman code to assign the length of the matches. Some files compress better with one gamma function and there is not a generic rule to choose the best one. The user can choose between the first 2 parameters or fix all parameters. If you fix only the first 2 parameters (flow and speed), the compressor will try all 18 variations for the other 2 (offset and gamma) and choose the one with offers better compression ratio for all files you specified. Also you can fix all 4 parameters, but not necessarily you'll choose the best algorithm. For example when you call with these parameters: saukav b1o4g0 inputfile.ext You'll have exactly the same zx7b variant. That's the generated inputfile.ext.skv is the same file that zx7b generates. But it's recommended to fix only flow and speed. This way your results will be better. Remember use the same call if you plan to uncompress different files with the same code: saukav f2 input1.scr input2.scr input3.scr Then in your code you'll have something like: ld hl, pfile1 ld de, $4000 call sauk call pause ld hl, pfile2 ld de, $4000 call sauk call pause ld hl, pfile3 ld de, $4000 call sauk ... include "d.asm" pfile1: incbin "input1.scr.skv" pfile2: incbin "input2.scr.skv" pfile3: incbin "input3.scr.skv" I recommend use first zx7b. Switch to saukav only when you have some experience with zx7b. Created by Antonio José Villena Godoy, 2017 Creative Commons Licensed by SA https://creativecommons.org/licenses/by-sa/4.0/legalcode