compress: replace compress_blob() with compress_blob_explicit()
And make compress_xyz() return 0 on success, as we know which compression
algorithm is used when calling compress_blob().
Follow-up for 2360352ef0.
This commit is contained in:
committed by
Daan De Meyer
parent
7cb9ed5d38
commit
bfeaa62dbc
@@ -63,7 +63,7 @@ int decompress_stream_xz(int fdf, int fdt, uint64_t max_size);
|
||||
int decompress_stream_lz4(int fdf, int fdt, uint64_t max_size);
|
||||
int decompress_stream_zstd(int fdf, int fdt, uint64_t max_size);
|
||||
|
||||
static inline int compress_blob_explicit(
|
||||
static inline int compress_blob(
|
||||
Compression compression,
|
||||
const void *src, uint64_t src_size,
|
||||
void *dst, size_t dst_alloc_size, size_t *dst_size) {
|
||||
@@ -80,12 +80,6 @@ static inline int compress_blob_explicit(
|
||||
}
|
||||
}
|
||||
|
||||
#define compress_blob(src, src_size, dst, dst_alloc_size, dst_size) \
|
||||
compress_blob_explicit( \
|
||||
DEFAULT_COMPRESSION, \
|
||||
src, src_size, \
|
||||
dst, dst_alloc_size, dst_size)
|
||||
|
||||
static inline int compress_stream(int fdf, int fdt, uint64_t max_bytes, uint64_t *ret_uncompressed_size) {
|
||||
switch (DEFAULT_COMPRESSION) {
|
||||
case COMPRESSION_ZSTD:
|
||||
|
||||
Reference in New Issue
Block a user