Bit-level RLE-based compression. It works as follows:
Every file is stored as binary digits on disk. This includes everything from text files to images.
Imagine now that you have a high-resolution monochrome bitmap, like maybe a scanned document. If each bit corresponded to a pixel value (like in a .BMP file with a color depth of 1), we would for a typical text document have:
- A large number of zeroes, as expected for a mostly white bitmap
- A few spots with many ones in between the large clusters of zeroes
This is obviously not a very efficient format. DioZip fixes that by storing the number of contiguous zeroes and ones on alternate bytes to reduce file size.
This repo comes with programs for both compressing (encode) and decompressing
(decode) files with this format. Compression is lossless and works well on
monochrome BMP files, but actually expands the size of text documents (where
you don't have that 0s or 1s next to each other).