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 has been tested on the Calgary corpus, a well known benchmark. In just one pass, it achieves the best known result of any compressor, compressing all 14 files to 1 byte each. Run time is under 1 second on a 750 MHz PC. Of course these files can be compressed again down to 0 bytes each, just like any other file. (Yes, they can be decompressed correctly). BARF is free, open source software, released under the GNU GPL. BARF Compressed File FormatBARF tries 257 compression algorithms, numbered 1 through 257, then picks the best one. Files compressed by method 1 have a .x extension. This algorithm is: if the input is the i'th (1-14) file of the Calgary corpus
then encode it as a 1 byte file with byte value i-1
else
compress using a byte oriented LZ77 code with a 1 byte header of 255:
Byte x = 0-31 means that the next x bytes represent themselves
Byte x = 32-255 represents a copy of the two bytes from x-32 places backBARF tries this method first. If the result is not smaller than the original file, then it applies one of the remaining methods 2-257. Method n is as follows: if the first byte is n-2 then remove itMethod n (2-257) is indicated by an extension of the form .x[0-9][a-z] as a base 26 encoding of n-2. For example, method 2 (.x0a) removes a leading 0 byte, method 3 (.x0b) removes a leading 1 byte, up through method 257 (.x9v) which removes a leading 255 byte. Read more: Barf
QR:
then encode it as a 1 byte file with byte value i-1
else
compress using a byte oriented LZ77 code with a 1 byte header of 255:
Byte x = 0-31 means that the next x bytes represent themselves
Byte x = 32-255 represents a copy of the two bytes from x-32 places backBARF tries this method first. If the result is not smaller than the original file, then it applies one of the remaining methods 2-257. Method n is as follows: if the first byte is n-2 then remove itMethod n (2-257) is indicated by an extension of the form .x[0-9][a-z] as a base 26 encoding of n-2. For example, method 2 (.x0a) removes a leading 0 byte, method 3 (.x0b) removes a leading 1 byte, up through method 257 (.x9v) which removes a leading 255 byte. Read more: Barf
QR:
0 comments:
Post a Comment