summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
Diffstat (limited to 'lzip.h')
-rw-r--r--lzip.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lzip.h b/lzip.h
index 15713ec..46a22d0 100644
--- a/lzip.h
+++ b/lzip.h
@@ -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 )
{