Creating a self booting ZIP archive

(goliath32.com)

73 points | by gdgghhhhh 2 days ago ago

14 comments

  • jlundberg a day ago ago

    Thx for a good read!

    Uncompressed ZIP files are a bit of an underappreciated container format.

    Fetching individual files from a big ZIP file even works over HTTP when the http server support range requests.

    • pwdisswordfishq 20 hours ago ago

      I actually did that a few times on gigabyte-sized ZIP files from the Internet Archive.

    • guipsp a day ago ago

      Well, you still have to find the zip header no?

      • tredre3 a day ago ago

        HTTP supports negative ranges, so you can request the final 64KB and scan it. If you don't find the Central Directory (unlikely unless the zip contains 10k files and/or lots of comments) then you just request another 64KB.

        • sltkr a day ago ago

          Note that the end-of-central-directory record at the end of the file contains the size and offset of the central directory, so if the central directory is not in the final 64 KiB you already have, you know exactly which range you need to request to get it (i.e. you don't need to keep scanning backwards 64 KiB at a time).

        • a day ago ago
          [deleted]
      • a day ago ago
        [deleted]
  • ebb_earl_co a day ago ago

    I have been a software developer for ten years, enthusiast for 20 years, and am “the computer guy” to my family and friends. However, when I read through something like this, it really feels that my knowledge of computing is ε away from 0…

  • Grimeton a day ago ago

    "Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."

    -- Dr. Ian Malcolm

    • pwdisswordfishq 20 hours ago ago

      Why do people bring up this quote in cases of innocuous, potentially even useful fun like this, but never to criticise actually harmful things like AI slop generators?