You are viewing a single thread.
View all comments
38 points

Damn, I was just looking into and learning about the different main compression (gzip, bzip, xz) algorithms the other week. I guess this is why you stick to the ol’ reliable gzip even if it’s not the most space efficient.

Genuinely crazy to read that a library this big would be intentionally sabotaged. Curious if xz can ever win back trust…

Can anyone help me understand xz vs Zstd?

permalink
report
reply
26 points

Technically, XZ is just a container that allows for different compression methods inside, much like the Matroska MKV video container. In practice, XZ is modified LZMA.

There is no perfect algorithm for every situation, so I’ll attempt to summarize.

  • Gzip/zlib is best when speed and support are the primary concerns
  • Bzip2 was largely phased out and replaced by XZ (LZMA) a decade ago
  • XZ (LZMA) will likely give you the best compression, with high CPU and RAM usage
  • Zstd is… really good, and the numerous compression levels offer great flexibility

The chart below, which was sourced from this blog post, offers a nice visual comparison.

permalink
report
parent
reply
8 points

Thanks for this! Good to know that Zstd seems to be a pretty much drop in replacement.

permalink
report
parent
reply
8 points

It looks like someone made a Rust implementation, which is a lot slower and only does decompression, but it’s at least a rival implementation should zstd get some kind of vulnerability.

permalink
report
parent
reply
3 points

It’s too bad xz is really great for archival.

permalink
report
parent
reply
21 points

(/s but I guess kinda not) state-actor weapon compression library vs Meta/FB compression library. Zstd is newer, good compression and decompression, but new also means not as widely used.

On the other hand, whether you trust a government more or less than Facebook/Meta is on your conscience.

permalink
report
parent
reply
5 points

Certainly not going back to that /s “state-actor weapon compression library” until it’s picked up by Red Hat or the like…

I guess gzip is good enough for me and my little home lab

permalink
report
parent
reply

Cybersecurity

!cybersecurity@sh.itjust.works

Create post

c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.

THE RULES

Instance Rules

  • Be respectful. Everyone should feel welcome here.
  • No bigotry - including racism, sexism, ableism, homophobia, transphobia, or xenophobia.
  • No Ads / Spamming.
  • No pornography.

Community Rules

  • Idk, keep it semi-professional?
  • Nothing illegal. We’re all ethical here.
  • Rules will be added/redefined as necessary.

If you ask someone to hack your “friends” socials you’re just going to get banned so don’t do that.

Learn about hacking

Hack the Box

Try Hack Me

Pico Capture the flag

Other security-related communities !databreaches@lemmy.zip !netsec@lemmy.world !cybersecurity@lemmy.capebreton.social !securitynews@infosec.pub !netsec@links.hackliberty.org !cybersecurity@infosec.pub !pulse_of_truth@infosec.pub

Notable mention to !cybersecuritymemes@lemmy.world

Community stats

  • 1.6K

    Monthly active users

  • 1.3K

    Posts

  • 2.6K

    Comments