• menas@lemmy.wtf
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    2 days ago

    haha. I spent so much time looking for an efficient compression algorithm for audio and movies … until I finally understood there are already compressed X) However it allow me to discover zst, wich is uncredible with text :

     35M test.log
    801K test.7z
      32 test.log.7z
      46 test.log.tar.bz2
      45 test.log.tar.gz
     108 test.log.tar.xz
      22 test.log.tar.zst
    2,1M test.tar.bz2
    8,1M test.tar.gz
    724K test.tar.xz
    1,1M test.tar.zst
    8,1M test.zip
    
    • sobchak@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      2 days ago

      Yeah, I found zst recently as well. Quite a bit faster than xz/7z which is what I previously used (or gz when I just needed something fast).

      • menas@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        I shall have check. No for some reason some archives failed. Not 7z, but it size is 800kB :

        35M test.log
        804K test.7z    
        8,1M test.tar.gz
        8,1M test.zip
        724K test.tar.xz
        2,1M test.tar.bz2
        1,1M test.tar.zst
        
      • rbn@sopuli.xyz
        link
        fedilink
        arrow-up
        7
        ·
        2 days ago

        And .tar.zst into 22!?

        What was that log file? Millions of identical characters?

  • addie@feddit.uk
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 days ago

    Well, yeah. The real advantage is only having a single file to transfer, makes eg. SFTP a lot less annoying at the command line.

    Lossless compression works by storing redundant information more efficiently. If you’ve got 50 GB in a directory, it’s going to be mostly pictures and videos, because that would be an incredible amount of text or source code. Those are already stored with lossy compression, so there’s just not much more you can squeeze out.

    I suppose you might have 50 GB of logs, especially if you’ve a logserver for your network? But most modern logging stores in a binary format, since it’s quicker to search and manipulate, and doesn’t use up such a crazy amount of disk space.

    • webhead@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 days ago

      I actually just switched a backup script of mine from using a tar.gz to just a regular tar file. It’s a little bigger but overall, the process is so much faster I don’t even care about the tiny extra bit of compression (100gb vs 120gb transferred over a 1gbit connection). The entire reason I do this is, like you said, transferring files over the Internet is a billion times faster as one file, BUT you don’t need the gzip step just for that

      • Björn@swg-empire.de
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        You probably know of this already, but you might consider using Borg Backup instead. It only sends the changed bits which is even faster.

        • webhead@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 hours ago

          I’ll have to take a look. I was trying to keep it simple but I’m not opposed to giving that tool a shot. Thanks. :)

  • Scubus@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    7
    ·
    2 days ago

    I dont remember him crushing a tank, is this an edit or did they release another watchmen movie?

    • SacralPlexus@lemmy.world
      link
      fedilink
      arrow-up
      16
      ·
      2 days ago

      It’s from the 2009 movie, during the montage where he is on Mars and is recounting to himself how he got his powers and his relationship with Janey. Timestamp is 1:10:08.

  • xoggy@programming.dev
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    3 days ago

    Turns out we’re already doing a lot of compression at the file and filesystem level.

    • Opisek@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      11
      ·
      3 days ago

      Not necessarily. For example, you can’t really compress encrypted files. You can certainly try but the result will likely be what the meme portrays.

      • WolfLink@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 days ago

        Media files are always thoroughly compressed (except in certain settings like professional video and audio work).

        • rainwall@piefed.social
          link
          fedilink
          English
          arrow-up
          5
          ·
          2 days ago

          Media files can can benefit from a codec change. Going from h264 to h265/hevc can net a 30-50% reduction in size for almost no quality loss.

          The only trade off is increased cpu usage if the client doesnt have hardware h265 support and the time to do the transcoding.

          • WolfLink@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 days ago

            It’s more relevant to the previous comment as an example of how we are doing a lot of compression at the filesystem level.

            The files that are typically largest are already quite thoroughly compressed.

  • MrLLM@ani.social
    link
    fedilink
    English
    arrow-up
    10
    ·
    3 days ago

    Plot twist: Your file manager reports directories in GB and files in GB converted to GiB with GB as units

    /j