There is a water shortage?
Out of context, but this video showing the amount of freshwater on the planet in perspective was eye opening for me... I see water availability different since.
Don't worry, global warming is desalinating the water so it will all be fresh in time π
Or use yEnc: https://en.m.wikipedia.org/wiki/YEnc
each file is minimum 4kb
$ touch empty_file
$ ls -l
total 8
-rw-rw-r-- 1 user group 0 may 14 20:13 empty_file
$ wc -c empty_file
0 empty_file
Huh?
It seems those are 4 KiB on Linux, interesting to know.
Even better! According to no hiding theorem, you can't destroy information. With black holes you maybe possibly could be able to recover the data as it leaks through the Hawking radiation.
Perfect for long term storage
i love this comment
I had a manager once tell me during a casual conversation with complete sincerity that one day with advancements in compression algorithms we could get any file down to a single bit. I really didn't know what to say to that level of absurdity. I just nodded.
That's the kind of manager that also tells you that you just lack creativity and vision if you tell them that it's not possible. They also post regularly on LinkedIn
You can give me any file, and I can create a compression algorithm that reduces it to 1 bit. (*)
(*) No guarantees about the size of the decompression algorithm or its efficacy on other files
Here's a simple command to turn any file into a single b!
echo a > $file_name
u can have everthing in a single bit, if the decompressor includes the whole universe
Well he's not wrong. The decompression would be a problem though.
Thatβs precisely when you bet on it.
Just make a file system that maps each file name to 2 files. The 0 file and the 1 file.
Now with just a filename and 1 bit, you can have any file! The file is just 1 bit. It's the filesystems that needs more than that.
It's an interesting question, though. How far CAN you compress? At some point you've extracted every information contained and increased the density to a maximum amount - but what is that density?
I think by the time we reach some future extreme of data density, it will be in a method of storage beyond our current understanding. It will be measured in coordinates or atoms or fractions of a dimension that we nullify.
This is a really good question!
I believe the general answer is, until the compressed file is indistinguishable from randomness. At that point there is no more redundant information left to compress. Like you said, the 'information content' of a message can be measured.
(Note that there are ways to get a file to look like randomness that don't compress it)
You want real infinite storage space? Here you go: https://github.com/philipl/pifs
Reality is stranger than fiction:
This was too damn funny for what I expected it to be
Nice stuff.
I got sold on the :
EOFdoes not consume less space than "5"
because, even though the space taken by the filesystem is the fault of the filesystem, one needs to consider the minimum information requirements of stating starts and ends of files, specially when stuff is split into multiple files.
I would have actually considered the file size information as part of the file size instead (for both the input and the output) because, for a binary file, which can include a string of bits which might match an EOF, causing a falsely ended file, would be a problem. And as such, the contestant didn't go checking for character == EOF, but used the function that truly tells whether the end of file is reached, which would, then be using the file system's file size information.
Since the input file was a 3145728 bytes and the output files would have been smaller than that, I would go with 22 bits to store the file size information. This would be in favour of the contestant as:
On the other hand, had the contestant decided to break the file between bits (instead at byte ends), instead of bytes (which, from the code, I think they didn't) the file size information would require an additional 3 bits.
Now, using this logic, if I check the result:
From the result claimed by the contestant, there were 44 extra bytes (352 bits) remaining.
+ 22 bits for the input file size information - 22*219 bits for the output file size information because 219 files
so the contestant succeeds by 352 + 22 β (22 Γ 219) = β4444 bits.
In other words, fails by 4444 bits.
Now of course, the output file size information might be representable in a smaller number of bits, but to calculate that, I would require downloading the file (which I am not in the mood for.
And in that case, you would require additional information to tell the file size bits. So;
22 in the inputqalc says, log(3145728 / 219, 2) = (ln(1048576) β ln(73)) / ln(2) β 13.81017544But even then, you have 352 + 5 + 22 β (5 + (14 Γ 219)) = β2692 for the best case scenario in which all output file sizes manage to be under 14 bits of file size informations.
More realistically, it would be something around 352 + 5 + 22 β ((5 + 14) Γ 219) = β3782 because you will the the 5 bits for every file, separately, with the 14 in this case, be a changing value for every file, giving a possibly smaller number.
If instead going with the naive 8 bit EOF that the offerer desired, well, going with 2 consecutive characters instead of a single one, seems doable. As long as you are able to find enough of said 2 characters.
After going on a little google search, I seem to think that in a 3MiB file, there would be either 47 or 383 (depending upon which of my formulae was correct) possible occurrences of the same 2 character combination. Well, you'd need to find the correct combination.
But of course, that's not exactly compression for a binary file, as I said before, as an EOF is not good enough.
I was sort of on Mike Goldman (the challenge giver)'s side until I saw the great point made at the end that the entire challenge was akin to a bar room bet; Goldman had always set it up as a kind of scam from the start and was clearly more than happy to take $100 from anyone who fell for it, and so should have taken responsibility when someone managed to meet the wording of his challenge.
Yeah, he was bamboozled as soon as he agreed to allow multiple separate files. The challenge was bs from the start, but he could have at least nailed it down with more explicit language and by forbidding any exceptions. I think it's kind of ironic that the instructions for a challenge related to different representations of information failed themselves to actually convey the intended information.
Reminds me of a project i stumbled upon the other day using various services like Google drive, Dropbox, cloudflare, discord for simultaneous remote storage. The goal was to use whatever service that has data to upload to, to store content there as a Filesystem.
I only remember discord being one of the weird ones where they would use base512 (or higher, I couldn't find the library) to encode the data. The thing with discord, is that you're limited by characters, and so the best way to store data in a compact way is to take advantage of whatever characters that are supported
What about a hard drive made of network pings?
I remember a project where someone booted Linux off of Google Drive. Cursed on many levels.
Store the data in pings that constantly get resent to keep the data in the internet
I donβt know if it was this one but it mightβve been this one https://github.com/qntm/base65536
Stupid BUT: making the font in LibreOffice bigger saves space. so having 11 is readible but by changing the font size to like 500 it can save some mb per page
I dont know how it works, i just noticed it at some point
Edit: i think it was kb, not mb
Have a macro that decreases all font size on opening and then increases all again before closing.
Follow me irl for more compression techniques.
When you run out of characters, you simply create another 0 byte file to encode the rest.
Check mate, storage manufacturers.
File name file system! Looks like we broke the universe! Wait, why is my MFT so large?!
255, generally, because null termination. ZFS does 1023, the argument not being "people should have long filenames" but "unicode exists", ReiserFS 4032, Reiser4 3976. Not that anyone uses Reiser, any more. Also Linux' PATH_MAX of 4096 still applies. Though that's in the end just a POSIX define, I'm not sure whether that limit is actually enforced by open(2)... man page speaks of ENAMETOOLONG but doesn't give a maximum.
It's not like filesystems couldn't support it it's that FS people consider it pointless. ZFS does, in principle, support gigantic file metadata but using it would break use cases like having a separate vdev for your volume's metadata. What's the point of having (effectively) separate index drives when your data drives are empty.

Relatable tbh
Oh, I guarantee that pi is 100% normal. Just not necessarily in the base you want it to be normal in.
we could also use it as a file system
https://beepbox.co/ for example
Let me guess, over 30 years old.
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
If you have a tub full of water and a take a sip, you still have a tub full of water. Therefore only drink in small sips and you will have infinite water.
Water shortage is a scam.
save