MYETV using the new Z-Standard compression algorithm

Data compression is a critical component in modern computing — from reducing storage usage to accelerating data transfers. While algorithms like Brotli, Gzip, and LZ4 have served well over the years, a newer contender has emerged and rapidly gained popularity: Zstandard (Zstd). Developed by Facebook, Zstandard offers a powerful blend of high compression ratios and fast decompression speeds, making it ideal for a broad range of applications.

MYETV is using this new compression algorithm called Z-Standard between server and client; while the communication between server and server is done through the brotli compression algorithm. This setup allows us to have a perfect compression between server and client with more than optimal performance.

These new compression algorithms are the ones that allow you to go back with the browser button and find the page as you left it previously (including, for example, a video left half-finished).

What Is Zstandard?

Zstandard is a real-time compression algorithm developed by Facebook, designed to offer fast compression and decompression speeds while achieving compression ratios comparable to the best-in-class algorithms. It’s open-source, backed by a strong community, and supported in numerous platforms, tools, and libraries.


Zstandard vs. Brotli: Key Differences

1. Speed

  • Compression: Zstandard is typically faster than Brotli, especially at mid-range compression levels.
  • Decompression: Zstd excels with extremely fast decompression speeds, which is crucial for real-time applications or high-throughput systems.

2. Compression Ratio

  • At its higher compression levels, Zstandard can compete with or outperform Brotli, depending on the dataset. It provides a good balance between ratio and speed.
  • Brotli might edge out Zstd slightly in static web content- [Contents: every content intended as text, images, audio or video] - compression, but Zstd wins in versatility and performance.

3. Scalability

  • Zstandard supports a wide range of compression levels (1–22) and includes a “dictionary mode” for even better performance on small files.
  • It also includes a long-distance matching feature to improve compression on large files.

4. Use Cases

  • Zstandard is widely used for log compression, backup solutions, database storage, and real-time systems.
  • Brotli is mostly used for HTTP compression in browsers but is not ideal for general-purpose data storage or transfer.

Benefits of Switching to Zstandard

Faster Performance

Zstandard delivers extremely low decompression latency. For services where decompression speed is a bottleneck (e.g., cloud storage, CDN edge servers), this means faster response times and lower CPU usage.

Better Compression Efficiency

With tunable levels and dictionary support, Zstd often offers better compression ratios than Gzip or LZ4 — and performs close to Brotli, if not better in many cases.

Lower CPU Usage

Zstd is optimized for modern CPUs and can leverage multithreading, reducing the overall resource cost of compression and decompression processes.

Versatile and Flexible

Whether you’re compressing logs, application data, or even game assets, Zstd adapts well across use cases — from high-throughput systems to embedded environments.

Actively Developed

Being maintained by Meta (Facebook), Zstandard is actively improved and widely adopted in tools like tar, systemd, Linux kernel, and various database systems.


Real-World Adoption

  • Facebook/Meta: Originally developed for Facebook’s internal infrastructure.
  • Linux: Zstd is used in kernel compression and initramfs.
  • ZFS and btrfs: These filesystems support Zstd for transparent compression.
  • macOS and Windows: Both operating systems include native support for Zstd in various contexts.

When Not to Use Zstandard?

  • For static website assets, Brotli might still be better due to slightly better ratios at max levels (though slower).
  • In older environments where Zstd support is missing or limited, Brotli or Gzip may be more compatible.

Conclusion

Zstandard represents the next step forward in data compression: fast, efficient, and highly versatile. While Brotli remains a solid choice for web compression, Zstd offers a superior experience in most other areas — from storage and backups to databases and real-time processing. If you’re looking to optimize your system’s performance and reduce resource usage, now is a great time to make the switch.