zstd: Create a function for use from U-Boot
authorSimon Glass <sjg@chromium.org>
Sat, 25 Sep 2021 13:03:09 +0000 (07:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
commit94d0a2efc0315e2c5e3b62a7420292f0ce058079
tree95b1149bb046581e83582fa375e1248e12f27884
parentc45b7920db21c8e0be89b15ea034ff3e9edb8e1d
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>
common/image.c
include/linux/zstd.h
lib/zstd/Makefile
lib/zstd/zstd.c [new file with mode: 0644]