Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. hey.

hey.

Scheduled Pinned Locked Moved Uncategorized
20 Posts 11 Posters 4 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems
    • zip has its trailer at the end of the file, while tar has headers in between archive members, so that works out
    • gzip is DEFLATE with a header, while zip supports DEFLATE, so this also works out
    • DEFLATE is almost closed under concatenation (there is a "this block is the last one" flag), but not quite

    if there was a way to make each archive member's data its own DEFLATE stream, and each tar header its own DEFLATE stream too, and then prepend a gzip header and append a zip trailer, it could all work!

    grawity@social.treehouse.systemsG This user is from outside of this forum
    grawity@social.treehouse.systemsG This user is from outside of this forum
    grawity@social.treehouse.systems
    wrote last edited by
    #11

    @whitequark I think zip also has headers between members? this reminds me of one .zip file I had encountered which had different contents if you scanned it forwards from the beginning (python zip module) vs if you went backwards from the trailer (normal programs)

    whitequark@social.treehouse.systemsW 1 Reply Last reply
    0
    • leah@blahaj.socialL leah@blahaj.social

      @whitequark probably, but the benefit of tar.gz is that it can compress across files.

      dpk@chaos.socialD This user is from outside of this forum
      dpk@chaos.socialD This user is from outside of this forum
      dpk@chaos.social
      wrote last edited by
      #12

      @leah @whitequark For a download you can send Content-Encoding: gzip instead of Content-Type: application/gzip (or as well as, it won’t make a difference if the whole stream is already compressed)

      whitequark@social.treehouse.systemsW 1 Reply Last reply
      0
      • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

        hey. you know how every code forge in existence offers you two types of downloads: tar and zip?

        i wonder if you can make that into one file that is both tar and zip.

        kim@k.iim.gayK This user is from outside of this forum
        kim@k.iim.gayK This user is from outside of this forum
        kim@k.iim.gay
        wrote last edited by
        #13

        @whitequark

        1 Reply Last reply
        0
        • leah@blahaj.socialL leah@blahaj.social

          @whitequark probably, but the benefit of tar.gz is that it can compress across files.

          whitequark@social.treehouse.systemsW This user is from outside of this forum
          whitequark@social.treehouse.systemsW This user is from outside of this forum
          whitequark@social.treehouse.systems
          wrote last edited by
          #14

          @leah to me the benefit of tar.gz is that it can represent the x bit

          1 Reply Last reply
          0
          • pervognsen@mastodon.socialP pervognsen@mastodon.social

            @whitequark There's also a whole genre of polyglot hacks: https://github.com/corkami/docs/blob/master/AbusingFileFormats/README.md.

            whitequark@social.treehouse.systemsW This user is from outside of this forum
            whitequark@social.treehouse.systemsW This user is from outside of this forum
            whitequark@social.treehouse.systems
            wrote last edited by
            #15

            @pervognsen yeah i know

            1 Reply Last reply
            0
            • dpk@chaos.socialD dpk@chaos.social

              @leah @whitequark For a download you can send Content-Encoding: gzip instead of Content-Type: application/gzip (or as well as, it won’t make a difference if the whole stream is already compressed)

              whitequark@social.treehouse.systemsW This user is from outside of this forum
              whitequark@social.treehouse.systemsW This user is from outside of this forum
              whitequark@social.treehouse.systems
              wrote last edited by
              #16

              @dpk @leah actually yeah this is a good point, you only really need to compress source code in transit (who even stores tarballs anymore)

              1 Reply Last reply
              0
              • grawity@social.treehouse.systemsG grawity@social.treehouse.systems

                @whitequark I think zip also has headers between members? this reminds me of one .zip file I had encountered which had different contents if you scanned it forwards from the beginning (python zip module) vs if you went backwards from the trailer (normal programs)

                whitequark@social.treehouse.systemsW This user is from outside of this forum
                whitequark@social.treehouse.systemsW This user is from outside of this forum
                whitequark@social.treehouse.systems
                wrote last edited by
                #17

                @grawity iirc the zip file headers can appear in a somewhat random order

                1 Reply Last reply
                0
                • ronflaix@mastodon.gamedev.placeR ronflaix@mastodon.gamedev.place

                  @whitequark zip because Windows?

                  (Nowadays windows 11 can unzip more than .zip anyway so that's slowly getting "solved")

                  Also yeah, that kind of trick could be really fun but ultimately they would still be .zips

                  david_chisnall@infosec.exchangeD This user is from outside of this forum
                  david_chisnall@infosec.exchangeD This user is from outside of this forum
                  david_chisnall@infosec.exchange
                  wrote last edited by
                  #18

                  @Ronflaix @whitequark

                  Not just Windows. The fact that you can extract individual files from a zip without full extraction has a few advantages in some use cases. Including using the file as backing store for a read-only filesystem.

                  whitequark@social.treehouse.systemsW 1 Reply Last reply
                  0
                  • david_chisnall@infosec.exchangeD david_chisnall@infosec.exchange

                    @Ronflaix @whitequark

                    Not just Windows. The fact that you can extract individual files from a zip without full extraction has a few advantages in some use cases. Including using the file as backing store for a read-only filesystem.

                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                    whitequark@social.treehouse.systems
                    wrote last edited by
                    #19

                    @david_chisnall @Ronflaix this is in fact my motivating example: I have a tarball that's 3 TB long, and I don't have a spare 3 TB (or spare 3.5 hours) every time I need one file from it

                    1 Reply Last reply
                    0
                    • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                      oh, i think this can be made to work!

                      Link Preview Image
                      dascandy@infosec.exchangeD This user is from outside of this forum
                      dascandy@infosec.exchangeD This user is from outside of this forum
                      dascandy@infosec.exchange
                      wrote last edited by
                      #20

                      @whitequark ... I like the way you're thinking.

                      1 Reply Last reply
                      1
                      0
                      • R relay@relay.infosec.exchange shared this topic
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups