This page contains repository of public domain code that I've written. It is created to be simple, straightforward and readable (within the limits of the inherent complexity).
This is the implementation of Deflate/Inflate compression/decompression. It contains different variants:
Download: zcomp-20190922.zip
This is the implementation of PNG encoder and decoder. The resulting pixel format is 32bit ARGB with pre-multiplied alpha (can be easily changed). Currently the support for interlaced images is missing, otherwise it should load any valid image in various formats. There is also a simplified variant of the PNG writer with no compression.
Download: png-20190922.zip
A small utility/code for creating of binary differences and applying of such patches. It was designed for storing differently linked variants of executables in FixScript but can be used for other use cases as well.
It works by hashing small chunks of the source file and then searching for them in the destination file. A region around each match is examined to allow for minor divergences. The resulting patch consists of a list of regions from the source file followed by a correction that is applied using a XOR operation. This correction is mostly zeros and is very compressable.
Download: bindiff-20240505.zip
More information here.
Download: mathlib-20240605.zip, mathlib-webdemo-20240605.zip
If you like the code you can support it by donating:
If you wish to contact me, use the e-mail jezek2@advel.cz. You can also find me on Libera IRC under the same nick.