If a .zip file contains all of the information of the original, just in less space, why does it have to be unzipped to access any of it?

792 views

If a .zip file contains all of the information of the original, just in less space, why does it have to be unzipped to access any of it?

In: 1276

43 Answers

Anonymous 0 Comments

It’s like a note on a piece of paper. You fold it up to make it smaller. Then you have to unfold it to read it.

Anonymous 0 Comments

You sort of can. For instance in Windows, you can compress your drives which essentially zips up every file on the drive, but when you want to read that file or a program beads to load it, the file system has to uncompress it on the fly to provide to the program.

Basically it’s way slower than just reading the uncompressed file.

Anonymous 0 Comments

If all your furniture is packed tightly in a moving truck, why do you have to unpack it to lay on the couch?

Anonymous 0 Comments

Think of it as a big bookshelf. It takes a bunch of space on in your room and is useful as, well, a shelf.

IKEA comes in and figures out how to take the shelf apart and put it in a compact box with instructions on how to put it back together.

So now you’ve got the entire shelf in the nice compact box. It takes up less space, easier to move around, etc. But it doesn’t function as a shelf. To make it work like a shelf again, you have to take it out of the box and follow the instructions to put it back together.

Anonymous 0 Comments

If you are asking why can’t you execute a script or program from a compressed file, the answer is that the application depends on relative file paths of adjacent files.

So if that’s an exe with dlls, everything needs to extract to a plain folder. When you ‘open’ content directly from a zip, the OS is technically decrypting that single file to a temporary path and then running from there.

If you have a zip that contains a single self-contained file, (an exe can embed references), then launching from zip just works, just as opening any single file ‘works’.

Anonymous 0 Comments

Imagine a flat pack table. When you buy it and put it in your car, you only need to use the space the flat pack occupies In your car. So it can be transported to your house. Then YOU build it into a full table. If you went and bought a fully built table it probably wouldnt fit in your car, and so you would have to use a van. A bigger vehicle to move it. The size of the car and the van are (if your are downloading the file) the bandwidth/transfer rate. Its faster and easier to transport the COMPRESSED flat pack than the fully built table. You may be able to get 4 flat packs into your car for every one fully built table. The act of building the table at home is the decompression software on your own PC. Unzipping is the building of that table. You are the processor.

Anonymous 0 Comments

You have a list of letter combinations. AAA, BBBB, CC, D, etc.

You don’t wanna waste paper because you need all the space you can have for other things you wanna write.

So you simplify the list of letters by saying “Ax3, Bx4, Cx2” etc. This is called compression. A lot of information stored digitally isn’t stored as conveniently or neatly as it could be by default.

Compressing a file in a zip or rar achieves this by taking the data and simplifying it into shorthand basically.

Once extracted, the data is still there because all you did was shorten the information by writing it more efficiently.

Disclaimer: this does not apply as easily to media such as images, video, or audio. Those actually DO remove some of the data in compression, but only enough so that the file can be reliably compressed into something that’s still of decent quality when decompressed. That’s done by removing extra frames in a video, pixels in an image, or frequencies in an audio file.

Anonymous 0 Comments

Others have explained how zip can work.

But just as an alternative, you don’t have to zip something to compress it. Several file systems can natively store data compressed and the access layer transparently decompresses it when you read it.

Windows NTFS is one of these, you can right click a file and set it to compressed. The size on disk and the actual size would then differ, but you’re still perfectly able to read it, albeit slower.

On certain (slow) disks this might actually speed up file reads – the disk IO is much slower than the CPU, so you read less but get more.

Anonymous 0 Comments

Can you wear a shirt that’s been put in a vacuum sealed bag? She shirts still there, it’s just not usable.

Anonymous 0 Comments

In the old days rhere was a program called stacker that did this to the whole hard drive. The problem is it takes longer to read the information. Window can actually do this as well.