marto1 / kolmogorc

compress and decompress a file using "code blocks"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compress and decompress a file using "code blocks"(see Kolmogorov
complexity).

The compression is not strictly lossless or lossy as it depends on the
code that represents the compressed form.

It is not safe.

The compressed form of a file is its "blocks" file + source code
shipped.  So for blocks2.txt(43 bytes) we also add secondexmp.py(43
bytes) = 86 bytes total.

Example run: python compress.py blocks.txt out.txt 
Output in: out.txt
note: not a good case to use this compression method.

Example run: python compress.py blocks2.txt out.txt 
Output in: out.txt
note: beats xz -9 in compression ratio.

About

compress and decompress a file using "code blocks"

License:Other


Languages

Language:Python 100.0%