You are viewing a single thread.
View all comments
10 points

I don’t get it… I must be missing something about zipped files.

permalink
report
reply
35 points
*

You’re not missing much. A few modern file types are zips with expected folder structures, especially MSOffice files. But this is nowhere near universally true.

You can open a file in your text editor of choice and if you see it start with PK (for Phil Katz the creator of the format and the original PKZIP/PKUNZIP programs) then it’s probably a zip.

Also, by the logic of the OP, all DLLs are EXEs.

permalink
report
parent
reply
21 points

OP refers to the fact that you can rename some filetypes to .zip and unpack them.

Notable examples microsoft office files (.docx) or android apps (.apk).

Counterexample are media files (mp3, mp4, jpg).

permalink
report
parent
reply
7 points

Notably, java jar files as well.

permalink
report
parent
reply
1 point

OP refers to the fact that you can rename some filetypes to .zip and unpack them.

So… you mean the zip program just rename them back? Why?

permalink
report
parent
reply
14 points

I think it makes sense from a programming view. When you have a document, you can add all the media files and pack them together as one archive. Then the program sets the filename to .docx so everyone knows that they need an office program to open that file.

For the users, all you need to know is what program can open which files. If every document would be named .zip, you would have no idea if it was a spreadsheet or slides for your presentation.

permalink
report
parent
reply
12 points

There are basically two types of files. Text files and binary files.

Most information are stored in text files so humans can easily understand it, and it’s easier to find errors, review, parse. But text storage takes more space than binary files. And many complicated softwares normally need multiple text files or data files, many of them just store them together as a zip file so that it’s easier to handle. Examples are .docx,.pptx, etc files in MS Office, try unzipping them and see what they contain. Zipping also has advantages of reducing file sizes.

permalink
report
parent
reply
10 points

Take a .docx file, using 7-zip, exctract it.

You will get an entire folder structure with several files inside the .docx file.

What OP means is that several programs use a zip file as a container for all the stuff they need in a save file.

The file extention is just a name for the OS to find the proper program to open the file.

permalink
report
parent
reply
4 points

OK, thanks for all the answers. I get it, a “docx” is a zip archive expected to contain something specific making it a docx. But why “most” though?

permalink
report
parent
reply
4 points

I think ‘most’ is hyperbole for dramatic effect / increased engagement. “more files than you might think are actually following the zip file structure” isn’t as punchy.

permalink
report
parent
reply
3 points

I just didn’t think of too many file extensions when I had this thought. I was also thinking of more obscure file extensions, and not the main media formats.

permalink
report
parent
reply

Showerthoughts

!showerthoughts@lemmy.world

Create post

A “Showerthought” is a simple term used to describe the thoughts that pop into your head while you’re doing everyday things like taking a shower, driving, or just daydreaming. The best ones are thoughts that many people can relate to and they find something funny or interesting in regular stuff.

Rules

  • All posts must be showerthoughts
  • The entire showerthought must be in the title
  • Posts must be original/unique
  • Be good to others - no bigotry - including racism, sexism, ableism, homophobia, transphobia, or xenophobia
  • Adhere to Lemmy’s Code of Conduct

Community stats

  • 6.7K

    Monthly active users

  • 979

    Posts

  • 10K

    Comments