zstd: Create a function for use from U-Boot

The existing zstd API requires the same sequence of calls to perform its
task. Create a helper for U-Boot, to avoid code duplication, as is done
with other compression algorithms. Make use of of this from the image
code.

Note that the zstd code lacks a test in test/compression.c and this should
be added by the maintainer.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-09-25 07:03:09 -06:00
committed by Tom Rini
parent c45b7920db
commit 94d0a2efc0
4 changed files with 85 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
obj-y += zstd_decompress.o
zstd_decompress-y := huf_decompress.o decompress.o \
entropy_common.o fse_decompress.o zstd_common.o
entropy_common.o fse_decompress.o zstd_common.o zstd.o