eli5: Why can’t programs run .zip files although they take just a few seconds to extract?

871 views

Title, really.

In: Technology

6 Answers

Anonymous 0 Comments

Extracting a .zip file doesn’t take long, but it is fairly complicated. Modern operating systems come with the software to do this built-in, so for the most part you never have to worry. However, programs that might use the contents of a .zip file do not necessarily contain the software to extract them.

Some programs *do* have this ability, and some just ask the operating system to extract it for them automatically. But most programs don’t do this, because the programmer didn’t want to add the extra parts necessary to do it. They may have simply though it wasn’t needed, or they thought it was better not to make their program larger by including something your computer can already do, or they just didn’t want to take the time to do it.

For whatever reason, which depends on the particular program in question, the creator didn’t include this ability.

Taking this a step more in depth, extracting a .zip file is as I mentioned complicated. And whenever it’s done, there are a few choices that need to be made: Do you extract *all* of it? Do you try to extract only the parts you need? Do you save the extracted files somewhere for later? Do you just load them into memory and dump them when you are done? Can your program also *save* files back into the .zip?

The answers to these questions always depend on the type of program. Some programs routinely extract .zip files into memory, use the content, and then just close them without changing it or copying anything. Other programs need to extract, and then modify, and put the newly changed file back. For some programs, doing any of this would cause them to be less efficient, or to take up too much memory.

So in most cases, the programmer just doesn’t want to deal with any of that. They don’t want to decide what happens, especially if it might not be that the user expects, or if it might make certain parts of their program run slowly in a way the user won’t understand.

So instead, they just expect the user to extract the file first, choose where to keep it, and then open the normal file as usual.

You are viewing 1 out of 6 answers, click here to view all answers.