During the hackathon Hack Week, developers from Dropbox implemented the fictional algorithm
Pied Piper from the TV series “Silicon Valley” (a comedy series about the hard life of startups).
Surprisingly, in a few days of intense coding, a working solution was obtained on the basis of
OpenH264 , which demonstrates compression up to 13% for H.264 videos and 22% on arbitrary JPEG files. To repeat, this is a fair lossless compression, when a compressed file can be returned to its original state with bit accuracy.
The source code for Pied Piper (losslessh264) is
published on Github under a free BSD license.
Those who watched the series "Silicon Valley" do not need to explain at all what the Pied Piper codec does. The developers copied everything from the film: its functionality (compression and decompression of files without loss of quality), and even the title. The only difference is that here is not cine fiction, but reality. The codec was created as if for fun, but it really works.
')
“Comic” development can save serious money for Dropbox, because this company keeps on its servers
exabytes of files of hundreds of thousands of corporate clients and individual users. Even saving 1% allows you to get rid of at least fifty server racks, what can we say about compression by 13-22%.
Not surprisingly, Dropbox threw ten programmers to this project right away. They bring to mind the version of the codec originally created during the hackathon.
Daniel Reiter HornDaniel Reiter Horn, one of the leading developers,
says that the algorithm corrects some of the outdated, inefficient encoding methods used to compress H.264 and JPEG files: “For example, almost all JPEG files are compressed by the Huffman algorithm today, but it’s well known that applying an additional arithmetic coder to existing JPEG files gives additional compression of 10% without affecting the file. Our Pied Piper algorithm is trying to achieve even greater effect; it is a more efficient coding algorithm, fully compatible with existing formats. ”
Implementation of an additional degree of compression due to the analysis of the previous and subsequent blocks with pixels in the frameThe
diagram shows that for the implementation of additional compression, a deeper analysis of the previous and subsequent blocks with pixels in the frame is used.
PS Probably, the Pied Piper project reminds someone the
Grandma's archiving algorithm , but here the code is still open and everyone can independently check the codec in action.