mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 10:56:02 +01:00
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:
@@ -1144,4 +1144,15 @@ size_t ZSTD_decompressBlock(ZSTD_DCtx *dctx, void *dst, size_t dstCapacity,
|
||||
size_t ZSTD_insertBlock(ZSTD_DCtx *dctx, const void *blockStart,
|
||||
size_t blockSize);
|
||||
|
||||
struct abuf;
|
||||
|
||||
/**
|
||||
* zstd_decompress() - Decompress Zstandard data
|
||||
*
|
||||
* @in: Input buffer to decompress
|
||||
* @out: Output buffer to hold the results (must be large enough)
|
||||
* @return size of the decompressed data, or -ve on error
|
||||
*/
|
||||
int zstd_decompress(struct abuf *in, struct abuf *out);
|
||||
|
||||
#endif /* ZSTD_H */
|
||||
|
||||
Reference in New Issue
Block a user