155 points · 107 comments · 2 years ago · zapdrive
github.comadamgordonbell
kevincox
maximise performance, we consider each individual byte of the file separately, and look it up in π.
Ok, so we store a byte and look it up in π. Now we get an offset. The exact offset will depend on the byte of course. But to simplify let's assume that π is "optimal". We will assume that the fist 256 offsets contain the first 256 bytes.
So our offset will be in the range 0-255. Storing our offset will then take 1 byte of storage.
Oh, I have found the problem.
So yes, you can find any data in π. But storing the location of that data will on average take the same amount of space as the data itself.
myaccount80
mal10c
I didn't think that was actually mathematically proven yet. Was some proof accepted recently that makes that quoted sentence true?
dang
πfs – A data-free filesystem - https://smackernews.com/item/28699499 HN - Sept 2021 (30 comments)
PiFS – The Data-Free Filesystem - https://smackernews.com/item/26208704 HN - Feb 2021 (1 comment)
Πfs: Never worry about data again - https://smackernews.com/item/21359338 HN - Oct 2019 (1 comment)
The π Filesystem for FUSE: Store Your Data in π - https://smackernews.com/item/19223032 HN - Feb 2019 (1 comment)
pifs - Avoid disk space usage by saving your files in the digits of Pi - https://smackernews.com/item/18687275 HN - Dec 2018 (1 comment)
πfs – A data-free filesystem - https://smackernews.com/item/13869691 HN - March 2017 (105 comments)
Πfs: Stores your data in π - https://smackernews.com/item/10856108 HN - Jan 2016 (1 comment)
Πfs: Never worry about data again - https://smackernews.com/item/10847693 HN - Jan 2016 (1 comment)
File system that stores location of file in Pi - https://smackernews.com/item/8018818 HN - July 2014 (98 comments)
100% Compression Using Pi - https://smackernews.com/item/6698852 HN - Nov 2013 (32 comments)
bmicraft
salgorithm
warent
In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π.
LOL so you get to store your data for free, and all it takes is allocating like 8 bytes for every byte. This project is galaxy braintherobotking
ftxbro
eating the onion
anecdotes of having the same idea
https://en.wikipedia.org/wiki/Normal_number
https://en.wikipedia.org/wiki/Pigeonhole_principleCuriousSkeptic
In this implementation, to maximise performance, we consider each individual byte of the file separately, and look it up in π.
Had me laughing out loud. Priceless!
jakelazaroff
This isn't necessarily true, right? AFAIK this only holds if pi is normal, which we haven't proven.
r3trohack3r
There are an infinite number of integers. You can start at 10 and count up forever, never running out of integers. But no matter how high you count, you’ll never count to “orange” - “orange” is not contained in the sequence of infinite integers.
You’ll need to first prove that every sequence of integers is contained somewhere in pi, since the number of possible integer sequences grows faster than the “space” for sequences in pi. In other words, I can always pick a digit that creates a valid, non repeating, integer sequence from the pool of possible sequences while never creating the integer sequence “123456789123456789123456789.” You’d need to prove that pi doesn’t do this.
Even if pi does contain every sequence of integers and you could map that to bytes which, in turn, maps to a file, this would not compress.
Your metadata directory would be larger than the raw files unless you get very lucky and your file is very early in the sequence of pi.
A byte can represent 256 unique values. 256 unique values can not compress to less than a byte. So if your index is a digit of pi where your file starts, your file starts after some other number of files. Your index is going to be the index inside of the address space of “all possible files.” This will get large very quickly.
jazzsax
Somewhere in pi (at some insane offset) is the entire work of William Shakespeare.
Is that the basic idea here?
miahwilde
based2
jsdeveloper
b33j0r
Nope, I’m undertraining. Get ready for TauOS.
bzmrgonz
pk-protect-ai
At the time I thought it could work with a big enough bank of digits of PI on both sides. If transfer was expensive, and calculating digits was cheap then you could give everyone an infinite supply of digits of pi and have a nearly infinite compression system.
I discovered that often the offset into pi is much larger than the data you are sending. Turns out it's an expensive way to sent things.
Also, it turns out that this area was already well understood. There are no free lunches with entropy.
But it was a fun idea to kick around.