lib: add Zstandard decompression support
Add the zstd library from Linux kernel (only decompression support).
There are minimal changes to build with U-Boot, otherwise the files are
identical to Linux commit dc35da16 from March 2018, the files had not
been touched since in kernel. Also SPDX lincese tags were added.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
diff --git a/lib/Kconfig b/lib/Kconfig
index 1ed69fa..416e63c 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -374,6 +374,12 @@
help
This enables ZLIB compression lib.
+config ZSTD
+ bool "Enable Zstandard decompression support"
+ select XXHASH
+ help
+ This enables Zstandard decompression library.
+
config SPL_LZ4
bool "Enable LZ4 decompression support in SPL"
help
@@ -398,6 +404,12 @@
help
This enables compression lib for SPL boot.
+config SPL_ZSTD
+ bool "Enable Zstandard decompression support in SPL"
+ select XXHASH
+ help
+ This enables Zstandard decompression library in the SPL.
+
endmenu
config ERRNO_STR