-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvement of literal run length & match length encoding #2
Comments
Hi da0ka, yes, this is a small inefficiency in the format, which was introduced to save on an extra operation in the decompressor. I.e. it is a performance optimization. Since the compressor itself is nearly optimal, it very well compensates for this inefficiency, literally losing 2 or 3 bytes per file usually. |
In fact, there is another way to improve the format, which will be almost compatible with the existing format. The pseudo-code would look as follows: In fact Z80 decompressors are already compatible with this format change. However, current decompressors for 8088 and 6502 are not compatible. Our current plan is to modify decompressors for this change and introduce the change at the compressor level together with the next minor version update. Or the one after. We do not want to rush it, esp. since the change in the compression ratio is basically negligible. |
`low=LITERALS_RUN_LEN_V1 or MATCH_RUN_LEN_V1
if(len >= low)
if((len-=low)<254)
output len
else if((len-=254)<256)
output 254,len
else ouput 255,len&255,len>>8
EOD marker:
ouput 0,255,255,255(because it is greater than BLOCK_SIZE)`
The text was updated successfully, but these errors were encountered: