Hard Drives are Expensive...What if I Compress my Windows folder instead?(原声文稿)
We've all been there.
You go to download that hot new game and then, ugh, ugh, ugh.
And sir, you can get rid of all these error messages by deleting some files, but you don't wanna do that.
And buying a new drive in this economy?
Well, Redditor, no difference 4 .12, thought they had a clever solution that wouldn't involve either of those things.
Why not just click add to archive and compress the data in their Windows folder?
Then all they need to do is wait for that sweet, sweet free storage to roll in.
Now at this moment, half of you are face -palming, the other half of you are going, well, there's no way Windows would even let you do that.
And then the third half of you are playing along at home on mom's laptop and about to have a really bad time because as it turns out, the face -palming crew was right.
Winrar will absolutely let you do this. We tested it for ourselves.
Now, it does, of course, complain anytime it hits one of the few dozen operating system files that are currently in use.
But other than that, it shuns right along, happily zipping, excuse me, roaring your precious system files.
And if you pick the right, or, well, I suppose the wrong options, it will also automatically delete everything that it just finished compressing without a care in the world until...
But hold on a second here.
Is compressing large chunks of your drive really such a crazy idea? As it turns out, the answer is no.
Let's start with a quick primer on the very concept of compression.
The way that data is stored on magnetic media can actually be incredibly wasteful.
Discs are broken down into chunks of bytes called sectors.
Traditionally there were 512 bytes in a sector, but these days there can be as many as 4096. of a deal? I mean, what's a few bytes between friends?
But back when an entire hard drive might hold just 10 or 20 megabytes, every byte was precious and any waste was a major concern.
So, some folks with brains more wrinkly than mine set out to find a solution.
Now an obvious approach would be to just put fewer bytes per sector than you'd have less waste.
But as it turns out, you would spend more data writing down those more granular addresses than you would actually save.
Okay, so how about taking those small inefficient files and bundling them together into a larger container file that squeezes out the extra zeros?
Well, that's a pretty good idea, and massive oversimplification incoming is pretty much what a tar file is.
Tar files are super useful for saving a little bit of space, but here's the issue.
While sucking all of the air out of your bag of chicken does help you utilize your freezer more efficiently, it doesn't actually make the chicken any smaller. So how can we do that? A shrink ray, probably, but we don't want a smaller chicken.
What we want is smaller computer files, so we're going to need something else.
A basic idea could be to look for repetitions in your data structure, and instead of red, red, red, red, red, red, red, red, red, red, red, red, red, red, red, red, red, red, you could simply say 12th red.
Or if you wanted to get a little bit more complicated, You could instead look for common sequences of bytes in your uncompressed file and just store a location marker for where that sequence was first seen.
Compression algorithms like these ones were simple but very effective, shrinking that sick Castle Elsinore shareware from 160 kilobytes all the way down to just 95, which would save almost $20 of 1982 hard disk space.
With that much at stake, everyone and their dog leapt into action, developing competing compression formats.
Even though almost all of them were actually building on top of a pair of algorithms from these dudes named Lempel and Ziv, which, fun fact by the way, is why so many compression schemes are named LZ -something.
Anyway, where there's money, lawyers will inevitably follow, and that is how, for just about a decade around the turn of the millennium, using the GIF format commercially was legally complicated, which other fun fact, though, is what ultimately led to the PNG format being created, but that's jumping way ahead in the timeline. Remember me again? Right, the early 80s.
There was a little company called Stack with a C who saw these tar containers and this concept of LZ something compression and thought, why not both?
And they began work on what would eventually to be released as stacker, which, well, did exactly what it said on the tin, effectively doubling your hard drive capacity by compressing your files and then wrapping those compressed files in a virtual hard disk container that was all handled in software completely invisibly to the user.
And as an added bonus, because drives back then were not fast like the ones we have today, we're talking like five megabits per second, And it also made file access faster.
I mean, why read 5 megabits when you can read 5 megabits that expands to 10 megabits once it hits your RAM?
And for a few bucks extra, they even had a hardware pressure card that turbocharged the experience even further. Needless to say, that idea took off!
And within a couple of years, full disk compression was pretty much standard, bundled with various DOS operating systems and even early Windows, typically offering a roughly two to one storage ratio over a non -compressed drive.
And as a bonus, it only made a few hard drives go sprang.
So then, like what happened to it?
Well, these days compression capabilities are actually just built right into many file systems.
And Windows 10 and 11 even feature a tool called Compact OS, which is specifically designed and to compress your operating system files to claw back some gigs at the cost of a bit of compute whenever you have to compress and decompress any files.
But hold on a second, why isn't CompactOS enabled by default? I mean, we got lots of compute, right? And storage. That's expensive.
Well, as it turns out, in the last 30 odd years, the math has changed quite a lot. Sorry, Mr. Incredible.
We do still deal with a ton of smallish files, just like before.
But your basic .txts have been replaced by more sophisticated .docx or other office xc formats.
And as it turns out, those newer formats are basically just zip files in disguise.
As for the web, more than 90 % of websites are using some form of compression, often a modern variant of those old LZ something schemes.
And the cold hard truth is that even with modern compute being so much more capable than decades past, you can only compress things so far before you start throwing away meaningful bits.
And compared to the 80s, modern storage, even now is ludicrously cheap. But Linus, you might say. Ain't nobody worried about a few kilobytes of word documents.
I mean, we've all amassed decades of digital photos, hundreds of albums of digital music, and enough digital movies to last us several lifetimes. Why don't we focus on compressing those? Well, that's the neat part.
And you did it so much that unlike the text files in the examples we showed you before, they aren't even perfect copies of the originals anymore.
That's where the terms lossless and lossy compression come from.
If we need a one -to -one perfect copy of our source material, then we would use a lossless algorithm, a sort of compression that we can fully reverse into the original data and vice versa infinitely.
Now, the compression ratio is not as good, but there are lots of times when every single bit is critical, like game assets or a piece of software.
Lossy algorithms, on the other hand, basically try to do their best to only discard data that most people won't notice is missing or that could be reconstructed later on down the line without anybody noticing.
And most modern multimedia formats would fall under this category.
jpeg lets us store thousands of digital photos on media the size of a fingernail mp3 and aac lets us fit entire record collections into our pants and mpeg lets us put the entire Marvel Cinematic Universe on this three times in 4k not that anyone would do such a thing this is just this is just Linux ISOs anyway of course there are still gains to be had from compressing your operating system files or Microsoft's built -in tool wouldn't exist. It's just that those gains are so small that they're probably not worth pursuing, which appears to be why it isn't enabled by default.
So, as is so often the case, our Intrepid Redditor had the right idea. They just picked the wrong tool for the job.
CompactOS was probably what they were after, rather than everyone's favorite shareware.
And realistically, most of their drive was probably already compressed anyway, Now, onto the deals on used server parts.
They're not as cheap as they used to be, but they're still cheaper than buying them new.