this post was submitted on 16 Jul 2024
23 points (100.0% liked)

Programmer Humor

35334 readers
1 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Psythik@lemmy.world 0 points 1 year ago* (last edited 1 year ago) (2 children)

Speaking of which, it blew my mind when I discovered that .EXEs are just ~~zip files~~ compressed archives. Same goes for .DLLs, and a lot of other common Windows file extensions as well. (.DOC too, for example IIRC). They all open in your favorite archiver software (I like NanaZip; which is a fork of 7-Zip with a modern UI).

[–] NeatNit@discuss.tchncs.de 1 points 1 year ago (2 children)

I don't think that's true for .exe or .dll files, but it's definitely true for .docx files and other Office files ending with x. Some .exe's are self-extracting archives or have other files embedded in them, so maybe that's what you've been seeing.

[–] areyouevenreal@lemm.ee 1 points 1 year ago (1 children)

You are actually correct. They can contain archived files or resources that can be unpacked with an archive program (including on Linux btw), but they aren't just a zip file. That's why my Linux archive manager (ark I think) offer to open one, but won't execute it. They can see the extra content even if they can't execute the file as intended.

[–] NeatNit@discuss.tchncs.de 1 points 1 year ago

Thanks for the backup :)

[–] Psythik@lemmy.world 0 points 1 year ago (1 children)

Why don't you just try it and see for yourself?

Remind me in about 5 hours and I'll upload a screenshot as proof when I get home.

[–] NeatNit@discuss.tchncs.de 0 points 1 year ago (1 children)

I'm not on Windows.

Let me know when you have the screenshot!

[–] Psythik@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

You could always download a random exe even in Linux, you know. But I'll handle it. Commuting home now.

[–] areyouevenreal@lemm.ee 1 points 1 year ago* (last edited 1 year ago)

Just because they open in 7-Zip or whatever doesn't mean they are just a zip file. There are several kinds of archives. EXEs are a special case as well. They aren't archives at all. Rather they can contain archives or extra content along with being an executable. One reason is self extracting archives. Here an archive is packaged with an extraction program as an exe all in one. The other case is exes that have extra resources like images, videos, graphics textures, etc. Either way it's an executable plus some extra stuff, not a zip archive. DLLs I am not sure about, but I suspect something similar is happening here.

Next time you should research stuff before posting it on Lemmy. Things are sometimes more complicated than they appear.

docx you are correct about though. Specifically it's a zip file that contains XML files and resources.

Edit: I actually found an article on self extracting archives, it's quite an interesting technology to be fair even if it causes confusion: https://en.m.wikipedia.org/wiki/Executable_compression