Public Domain Software

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).

Inflate/Deflate/ZLIB/GZIP/whatever compression

This is the implementation of Deflate/Inflate compression/decompression. It contains different variants:

Only static Huffman table is used when compressing as computation of the tables is complex and not straightforward task given the constraints imposed by the format. However this is the less important part of the compression.

Download: zcomp-20190922.zip

PNG encoder/decoder

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

Binary diff/patch

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

Tiny math library

More information here.

Download: mathlib-20240605.zip, mathlib-webdemo-20240605.zip

Support

If you like the code you can support it by donating:

Contact

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.