diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:49:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:50:00 +0000 |
commit | 12326d715eafc241fcbd076d078cdc6171c98076 (patch) | |
tree | df1f839e27e78ffa62b039c14257e6eeca474bad /lzip.h | |
parent | Releasing debian version 0.7-7. (diff) | |
download | xlunzip-12326d715eafc241fcbd076d078cdc6171c98076.tar.xz xlunzip-12326d715eafc241fcbd076d078cdc6171c98076.zip |
Merging upstream version 0.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lzip.h')
-rw-r--r-- | lzip.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ /* Xlunzip - Test tool for the lzip_decompress linux module - Copyright (C) 2016-2021 Antonio Diaz Diaz. + Copyright (C) 2016-2024 Antonio Diaz Diaz. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,23 +42,23 @@ struct Pretty_print static const uint8_t lzip_magic[4] = { 0x4C, 0x5A, 0x49, 0x50 }; /* "LZIP" */ -typedef uint8_t Lzip_header[6]; /* 0-3 magic bytes */ +enum { Lh_size = 6 }; +typedef uint8_t Lzip_header[Lh_size]; /* 0-3 magic bytes */ /* 4 version */ /* 5 coded dictionary size */ -enum { Lh_size = 6 }; -static inline bool Lh_verify_magic( const Lzip_header data ) - { return ( memcmp( data, lzip_magic, 4 ) == 0 ); } +static inline bool Lh_check_magic( const Lzip_header data ) + { return memcmp( data, lzip_magic, 4 ) == 0; } -static inline bool Lh_verify_version( const Lzip_header data ) - { return ( data[4] == 1 ); } +static inline bool Lh_check_version( const Lzip_header data ) + { return data[4] == 1; } -typedef uint8_t Lzip_trailer[20]; +enum { Lt_size = 20 }; +typedef uint8_t Lzip_trailer[Lt_size]; /* 0-3 CRC32 of the uncompressed data */ /* 4-11 size of the uncompressed data */ /* 12-19 member size including header and trailer */ -enum { Lt_size = 20 }; static inline unsigned long long Lt_get_data_size( const Lzip_trailer data ) { |