What exactly happens when a ZIP file is extracted?

77 viewsOtherTechnology

I know the structure of a ZIP file, but how does a computer go about reassembling it into a directory? I’m not asking about compression algorithms, what I mean is in what order does it decompress the files, and in what order does it write them to storage?

In: Technology

4 Answers

Anonymous 0 Comments

Zip files don’t have a tree structure, just a list of entries. Each entry has a filename, which may or may not include subdirectories – for example if you have a folder inside the zip named “A” which contains two files “b.exe” and “c.txt”, then you’ll simply have two entries named “Ab.exe” and “Ac.txt”. The order of the entries within the zip file is not important – you can have one file from directory A, followed by a file from directory B, then another file from A etc.

Most zip programs would just extract the entries sequentially, creating the necessary folders and files as needed.

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