Open Menu
AllLocalCommunitiesAbout
lotide
AllLocalCommunitiesAbout
Login

Most file types are just a renamed .zip

⁨131⁩ ⁨likes⁩

Submitted ⁨⁨7⁩ ⁨months⁩ ago⁩ by ⁨Interstellar_1@lemmy.blahaj.zone⁩ to ⁨showerthoughts@lemmy.world⁩

source

Comments

Sort:hotnewtop
  • JackGreenEarth@lemm.ee ⁨7⁩ ⁨months⁩ ago

    Or a renamed txt. Eg, .js, .py, .css, .html, .json

    source
    • victorz@lemmy.world ⁨7⁩ ⁨months⁩ ago

      Thank God they went with file name extensions so we didn’t have to preface every source .txt file with header content to instruct the editor about what kind of content it would have.

      source
      • foggy@lemmy.world ⁨7⁩ ⁨months⁩ ago

        <!DOCTYPE JAVASCRIPT>

        source
        • -> View More Comments
      • JackGreenEarth@lemm.ee ⁨7⁩ ⁨months⁩ ago

        Why do I need to put that at the start of bash, desktop, and html files then?

        source
        • -> View More Comments
  • AbouBenAdhem@lemmy.world ⁨7⁩ ⁨months⁩ ago

    AKA “Why zip compression doesn’t reduce things any more”.

    source
    • LodeMike@lemmy.today ⁨7⁩ ⁨months⁩ ago

      ?

      source
      • AbouBenAdhem@lemmy.world ⁨7⁩ ⁨months⁩ ago

        Zipping a file repeatedly typically doesn’t reduce the size further after the first time.

        source
        • -> View More Comments
    • JasonDJ@lemmy.zip ⁨7⁩ ⁨months⁩ ago

      My 1.5gb log folders disagree.

      source
  • bjoern_tantau@swg-empire.de ⁨7⁩ ⁨months⁩ ago

    Your MOM is a renamed zip!

    And if not, wow, she really kept herself in shape. Very good.

    source
    • moistclump@lemmy.world ⁨7⁩ ⁨months⁩ ago

      She keeping them filled tight if you know what I mean

      source
  • JackLSauce@lemmy.world ⁨7⁩ ⁨months⁩ ago

    Counterpoint: what?

    source
  • fine_sandy_bottom@lemmy.federate.cc ⁨7⁩ ⁨months⁩ ago

    Not really. The “file types” you’re talking about are expected to contain whatever things in a very specific format.

    You’re really just saying “many file types use an efficient and common compression algorithm”. Which is correct, obvious, and to be expected.

    source
    • boletus@sh.itjust.works ⁨7⁩ ⁨months⁩ ago

      A .docx is just a zip file with xml documents in it.

      source
      • fine_sandy_bottom@lemmy.federate.cc ⁨7⁩ ⁨months⁩ ago

        What happens if I put an mp3 or an epub file in there with the xml? Is it still a word document?

        source
        • -> View More Comments
  • mumblerfish@lemmy.world ⁨7⁩ ⁨months⁩ ago

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

    source
    • IHawkMike@lemmy.world ⁨7⁩ ⁨months⁩ ago

      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 really a zip.

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

      source
    • cron@feddit.org ⁨7⁩ ⁨months⁩ ago

      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).

      source
      • pixeltree@lemmy.blahaj.zone ⁨7⁩ ⁨months⁩ ago

        Notably, java jar files as well.

        source
      • mumblerfish@lemmy.world ⁨7⁩ ⁨months⁩ ago

        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?

        source
        • -> View More Comments
    • thevoidzero@lemmy.world ⁨7⁩ ⁨months⁩ ago

      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.

      source
    • stoy@lemmy.zip ⁨7⁩ ⁨months⁩ ago

      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.

      source
    • mumblerfish@lemmy.world ⁨7⁩ ⁨months⁩ ago

      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?

      source
      • Acamon@lemmy.world ⁨7⁩ ⁨months⁩ ago

        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.

        source
        • -> View More Comments