4 ms·
If true, that could be an exceptionally interesting method of compression. Any volume of data can be compressed to two numbers: an offset and a length. Presumin
by curryst 6y ago
If true, that could be an exceptionally interesting method of compression. Any volume of data can be compressed to two numbers: an offset and a length. Presuming we have a way to "stream" the numbers, rather than having to calculate the entire value.
- thestoicattack 6y agoWe do have such a digit-extraction algorithm: https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...
- tyilo 6y agoThis has been done: https://github.com/philipl/pifs https://github.com/philipl/pifs
- zild3d 6y agoalso means the offset can be larger than the data
- SamBam 6y ago...and almost always is, except in the trivial cases of tiny numbers right near the start. Which is why it doesn't actually work as an encryption algorithm. The other idea I've always liked is a length that, to enough precision, encodes something in the decimal places. Then in theory you could just cut something, say a diamond, to this impossible precision, and then measure it later. I assume that, like the Pi example, this is impractical not only in practice but even in theory, even if we had impossibly-accurate cutters and measurers.
- gnulinux 6y agoThat would not be compression since the number of bits required to store offset would on average be larger than the number of bits required to store the actual data.
- tshaddox 6y agoIt’s not particularly interesting and almost certainly not viable as a useful method of compression. It’s essentially just using pi as a pseudo-random number generator and encoding the desired message as an index into the output sequence of the PRNG. If it sounds slightly more interesting than that, it’s probably only because pi has a lot of mystique around it in popular culture.
- c22 6y agoIf you tweak your prng to output the "interesting content" at the beginning then you've created algorithmic content which is very interesting and can look a lot like compression at first glance.