Sunday, April 1, 2012

Williams Compression

Now April is with us I thought It's about time I shared an idea for a new compression scheme I've been thinking about. In short, it converts all files into  ~16 bytes of data. Here's how it works:

for bit in file:
    if bit is ON:
         on += 1
    else:
         off += 1

output "{on},{off}".

Here's how it looks:

Led Zeppelin Stairway to Heaven: 37810200, 39509240

Stephen Merchant Standup: 283554505, 314875207

Genesis More Fool Me: 14985253, 15456251

In fact. Here's the whole album:

Selling England by the pound: 119882024, 316167032

It's quite lossy, but it allows you to send most files in a single tweet. You could even send the extended version of the Lord of the Rings.