BARF - Compress any file to zero bytes

  • 14 Replies
  • 4656 Views
*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
BARF - Compress any file to zero bytes
« on: August 30, 2008, 04:49:55 AM »
I was reading about data compression, and I found an algorithm called BARF (Better Archiver with Recursive Functionality) that can reduce the size of any nonempty file by one byte, such that by applying it recursively one can compress any file to zero bytes. I was sceptical at first, but after reading about how it works I am convinced that it will indeed compress any file to zero bytes and be able to decompress it again to retrieve the original data. See for yourself.
I'm going to side with the white supremacists.

*

WardoggKC130FE

  • 11857
  • What website is that? MadeUpMonkeyShit.com?
Re: BARF - Compress any file to zero bytes
« Reply #1 on: August 30, 2008, 09:37:02 AM »
Well considering the article is 5 years old and this still isnt mainstream knowledge.  I don't think it worked out so well.

*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
Re: BARF - Compress any file to zero bytes
« Reply #2 on: August 30, 2008, 09:41:44 AM »
Did you read about how it works?
I'm going to side with the white supremacists.

*

WardoggKC130FE

  • 11857
  • What website is that? MadeUpMonkeyShit.com?
Re: BARF - Compress any file to zero bytes
« Reply #3 on: August 30, 2008, 09:43:15 AM »
Yes.  But I'll admit I didn't understand most of it. ??? :-\

*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
Re: BARF - Compress any file to zero bytes
« Reply #4 on: August 30, 2008, 09:48:37 AM »
It took me a while to figure it out. Then I cracked up laughing.
I'm going to side with the white supremacists.

*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
Re: BARF - Compress any file to zero bytes
« Reply #5 on: July 26, 2010, 04:08:31 AM »
I am disappointed that nobody else got this. :(
I'm going to side with the white supremacists.

*

SupahLovah

  • 5167
  • Santasaurus Rex!
Re: BARF - Compress any file to zero bytes
« Reply #6 on: July 26, 2010, 05:22:57 AM »
Quote
Method 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.

Although BARF does not compress every file to one byte on the first pass, it can be easily modified to do this on any benchmark of up to 255 files. Instructions are found in the source code

I lol'd.
"Study Gravitation; It's a field with a lot of potential!"

Re: BARF - Compress any file to zero bytes
« Reply #7 on: July 26, 2010, 09:42:12 AM »
reminds me of the "write only memory": http://www.national.com/rap/files/datasheet.pdf

*

Tusk

  • Official Member
  • 3615
  • Guidance is internal
Re: BARF - Compress any file to zero bytes
« Reply #8 on: July 26, 2010, 05:51:34 PM »

Fukin nerds.

Hang on, I'll just check my personal care factor for this week : nope still don't give a fuck

*

Raist

  • The Elder Ones
  • 30590
  • The cat in the Matrix
Re: BARF - Compress any file to zero bytes
« Reply #9 on: July 26, 2010, 09:18:37 PM »
I am disappointed that nobody else got this. :(

I got it, it basically transfers the entire file into its own "decoding program" compressing one file while building a more and more non compressed "decoder" in a file housed within itself. This makes it seem like less hard drive space is being used by the file that is being compressed, but at most it only slightly compresses the total space used.

*

Lorddave

  • 18555
Re: BARF - Compress any file to zero bytes
« Reply #10 on: July 26, 2010, 09:54:30 PM »
I am disappointed that nobody else got this. :(

I got it, it basically transfers the entire file into its own "decoding program" compressing one file while building a more and more non compressed "decoder" in a file housed within itself. This makes it seem like less hard drive space is being used by the file that is being compressed, but at most it only slightly compresses the total space used.

Ahhh, is THAT what it does.  I knew it was something odd but I wasn't sure exactly what.
You have been ignored for common interest of mankind.

I am a terrible person and I am a typical Blowhard Liberal for being wrong about Bom.

*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
Re: BARF - Compress any file to zero bytes
« Reply #11 on: July 27, 2010, 04:15:58 AM »
I am disappointed that nobody else got this. :(

I got it, it basically transfers the entire file into its own "decoding program" compressing one file while building a more and more non compressed "decoder" in a file housed within itself. This makes it seem like less hard drive space is being used by the file that is being compressed, but at most it only slightly compresses the total space used.

Ahhh, is THAT what it does.  I knew it was something odd but I wasn't sure exactly what.

No, that's not what it does. It's not particularly difficult to figure out, given that the documentation linked to in the OP quite plainly explains its function.
I'm going to side with the white supremacists.

?

Crustinator

  • 7813
  • Bamhammer horror!
Re: BARF - Compress any file to zero bytes
« Reply #12 on: July 27, 2010, 06:40:14 AM »
I am disappointed that nobody else got this. :(

No we get it. It's just not funny. Jokes from Computer Science lecturers rarely are.

*

Raist

  • The Elder Ones
  • 30590
  • The cat in the Matrix
Re: BARF - Compress any file to zero bytes
« Reply #13 on: July 27, 2010, 10:10:07 AM »
I am disappointed that nobody else got this. :(

I got it, it basically transfers the entire file into its own "decoding program" compressing one file while building a more and more non compressed "decoder" in a file housed within itself. This makes it seem like less hard drive space is being used by the file that is being compressed, but at most it only slightly compresses the total space used.

Ahhh, is THAT what it does.  I knew it was something odd but I wasn't sure exactly what.

No, that's not what it does. It's not particularly difficult to figure out, given that the documentation linked to in the OP quite plainly explains its function.

Then please explain what it does? And if it's what I said but explained differently, fuck you.

*

Parsifal

  • Official Member
  • 36118
  • Bendy Light specialist
Re: BARF - Compress any file to zero bytes
« Reply #14 on: July 27, 2010, 01:39:12 PM »
Then please explain what it does? And if it's what I said but explained differently, fuck you.

The decoder has a selection of up to 256 pre-defined files in it. It doesn't write the file into the decoder during encode, so only up to 256 files can be compressed to one byte in the first pass. All other files are either compressed normally, or if that results in a larger file (e.g. if the file is already compressed) then the last byte gets encoded into the filename extension and removed from the file. In other words, repeatedly compressing arbitrary files results in a zero byte file with a name about three times as large as the original file contents, consisting mostly of filename extensions that code for the byte sequence.
I'm going to side with the white supremacists.