From 716f3f612e62c55edd052b505a86e4e2e09074a5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 1 Jun 2010 14:41:39 +0200 Subject: 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 --- archival/libunarchive/unxz/xz_stream.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'archival/libunarchive/unxz/xz_stream.h') 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 # 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 -- cgit v1.1