Merging upstream version 0.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4279a1e7bc
commit
d24e3d2e19
16 changed files with 487 additions and 362 deletions
18
lzip.h
18
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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue