diff options
author | Denys Vlasenko | 2010-06-01 14:41:39 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-06-01 14:41:39 +0200 |
commit | 716f3f612e62c55edd052b505a86e4e2e09074a5 (patch) | |
tree | b930509d157cdf4fb3d80fb2633d3da500eb8e90 /archival/libunarchive/unxz/xz_stream.h | |
parent | 11bcf4b22449d08b61617183c1951db98457653a (diff) | |
download | busybox-716f3f612e62c55edd052b505a86e4e2e09074a5.zip busybox-716f3f612e62c55edd052b505a86e4e2e09074a5.tar.gz |
decompress_unxz: newer version, one which can unpack SHA-256 protected files
function old new delta
check_sizes - 16 +16
crc32_table - 4 +4
index_update 47 40 -7
crc32_validate 110 93 -17
dec_vli 197 165 -32
unpack_xz_stream 4284 4014 -270
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/4 up/down: 20/-326) Total: -306 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libunarchive/unxz/xz_stream.h')
-rw-r--r-- | archival/libunarchive/unxz/xz_stream.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/archival/libunarchive/unxz/xz_stream.h b/archival/libunarchive/unxz/xz_stream.h index efbe75a..36f2a7c 100644 --- a/archival/libunarchive/unxz/xz_stream.h +++ b/archival/libunarchive/unxz/xz_stream.h @@ -10,10 +10,10 @@ #ifndef XZ_STREAM_H #define XZ_STREAM_H -#if defined(__KERNEL__) && !defined(XZ_INTERNAL_CRC32) +#if defined(__KERNEL__) && !XZ_INTERNAL_CRC32 # include <linux/crc32.h> # undef crc32 -# define xz_crc32(crc32_table, buf, size, crc) \ +# define xz_crc32(buf, size, crc) \ (~crc32_le(~(uint32_t)(crc), buf, size)) #endif @@ -43,4 +43,15 @@ typedef uint64_t vli_type; /* Maximum encoded size of a VLI */ #define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7) +/* Integrity Check types */ +enum xz_check { + XZ_CHECK_NONE = 0, + XZ_CHECK_CRC32 = 1, + XZ_CHECK_CRC64 = 4, + XZ_CHECK_SHA256 = 10 +}; + +/* Maximum possible Check ID */ +#define XZ_CHECK_MAX 15 + #endif |