4 ms·
I've seen worse; someone presented code for decompression of a fictional data format with no plan in sight for compression. When I asked how the compression pa
by elpocko 5y ago
I've seen worse; someone presented code for decompression of a fictional data format with no plan in sight for compression.
When I asked how the compression part would be implemented, the author called me stupid for asking this question and told me the project was inspired by https://en.wikipedia.org/wiki/Sloot_Digital_Coding_System https://en.wikipedia.org/wiki/Sloot_Digital_Coding_System
- klyrs 5y agoThat is simply amazing, thanks for sharing :)
- magicalhippo 5y agoReminds me when I as a 14 year old, barely two years after I started learning programming and having just learned about cyclic redundancy check (CRC), wondered why they couldn't be used for compression. Take a block of say 16 bytes, calculate the CRC code and store that. To decompress you then just had to find the string of bytes that generated a matching CRC code. It seemed so brilliant, but something told me it was too good to be true, and surely someone would have come up with this before me... So I tried figuring out why it wouldn't work. Still, took me a day or so before I figured out how long "just" was and that collisions would render it moot anyway. Learned a lot from that though, as an aspiring programmer.
- bigiain 5y agoNo no, you need to store the CRC and the output of an object recogniser. A 16 byte CRC plus the word "cat" will have way way fewer collisions!
- IIAOPSW 5y agoReminds me of my genius compression algorithm from when I was around 12. Information on the computer is just numbers right? So why not just divide the number by two over and over until its in the single digits. Infinite compression. The only thing left to figure out is how to compress all the remainders from the numbers that aren't divisible by two. Needless to say, I never could solve that problem.
- eru 5y agoYou are joking, but something a bit like this can actually work with some extra assumptions. Have a look at compressed sensing!