• wumpus@latte.isnot.coffee
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    26
    ·
    1 year ago

    Regardless which lossless compression algorithm you prefer, it makes most files bigger.

    *where “files” includes all bitstrings of a given length, whether or not they’ve ever existed

    • SpaceNoodle@lemmy.world
      link
      fedilink
      English
      arrow-up
      28
      arrow-down
      2
      ·
      1 year ago

      That’s pretty disingenuous, since most files aren’t just random data.

      Most real files actually have rather low entropy, even if they look like random junk (e.g., executables), chiefly due to repetition of similar data and sparse values.

      • wumpus@latte.isnot.coffee
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        5
        ·
        1 year ago

        Exactly. It’s merely our human preference for those types of files that allow them to work at all.

        • SpaceNoodle@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          1 year ago

          It’s not a preference; it’s simply the state of the system to which we may desire to apply compression.

    • kartonrealista@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year ago

      Is it because it works on patterns and your random garbled string would have too much noise to be compressed well, while a structured file coming from an actual piece of software would probably have enough repeating patterns to the point where it actually can be shrunk?

    • qprimed@lemmy.ml
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      1 year ago

      the ups and downs are battling hard on the parent comment. gotta admit, I had to think for a few seconds to get the gist of it, but its actualy pretty slick and perfectly snarky.

      edit: only thought would be that an infinate selection of random data sets would be somewhat evenly split between compressable and non-compressable, but if you add compression structure, it tips the balance firmly into “file size increases” territory.

      very cool little comment.