Compress any file to 0 bytes RRS feed

  • Question

  • Can you imagine compressing a file by 100%, i.e. compacting a file to 0 bytes? Sounds too astonishing. Well, don't be stupefied when you read that its possible to compress any file to 0 bytes.

    BARF! or Better Archiver with Recursive Functionality can achieve a file compression of 100% by recursively compressing the file. The BARF compressor will compress any nonempty file by at least one byte. Thus, by compressing already compressed files over and over again, it is possible to eventually reduce any file to 0 bytes.

    BARF is free, open source software, released under the GNU GPL. Its code is written in C/C++ and can be downloaded from the BARF webpage.

    How it Works?
    BARF uses recursive compression to compress the file. BARF compresses the files by using one of the 257 compression algorithms by selecting the best one at each stage of recursion. At each step it adds an extension .x or .x?? to the existing filename. This technique ensures that there is no disambiguation while decompressing the files.

    To try it out, read the steps on my blog.
    Saturday, September 22, 2007 10:52 AM

All replies

  • gr8..........
    Monday, September 24, 2007 10:57 AM

    Filesize decreases by a byte and filename increases by 4 bytes. Means, you endup in spending extra 3 bytes. Gain? minus three bytes.


    Simply, it stores file data in the filename!


    If you want to see the fun, try renaming filename of compressed file and now decompress. You'll realise, it either cannot decompress or produces wrong uncompressed data.  Thats trick.


    Friday, September 19, 2008 2:20 AM