Updated Zstd Implementation

Zstandard (or zstd) is a lossless data compression algorithm developed by Yann Collet at Facebook.

While the Linux kernel is increasingly supporting the use of Zstd for various compression purposes, the current Zstd code within the kernel is out-of-date and efforts so far to re-base it against the closer to upstream Zstd state have been stalled. Fortunately, a new attempt at getting the Zstd code updated for the Linux kernel will be published soon. 

There has been Linux kernel work to support Zstd compressed modules, Zstd compressed firmware, Zstd'ed kernel image, and work like Btrfs Zstd file-system compression. Zstandard is increasingly used throughout the open-source ecosystem for its speedy decompression capabilities and overall great design and performance. 

While the kernel continues making use of Zstd, the existing in-kernel code is out-of-date while there was an effort by Zstd's Nick Terrell of Facebook to get that code updated from upstream and also make it more automatically-generated moving forward so the kernel's implementation can stay closer to upstream and in more maintainable shape. Sadly, that has been a mess and the effort ultimately stalled. Fortunately, Nick Terrell shared he is working on a new patch series.

He says to expect some action on this front soon, potentially in time for the next kernel merge window. This in turn should get the kernel code into a state at least based on Zstd 1.5 and in turn deliver a nice performance upgrade to the kernel for functionality leveraging this compression algorithm. 

Compression speed can vary by a factor of 20 or more between the fastest and slowest levels, while decompression is uniformly fast, varying by less than 20% between the fastest and slowest levels.