1
0
Fork 0

Merging upstream version 0.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 16:01:38 +01:00
parent 3de47bdbc0
commit a40555eef7
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
16 changed files with 536 additions and 317 deletions

9
lzip.h
View file

@ -121,16 +121,21 @@ public:
uint32_t operator[]( const uint8_t byte ) const throw() { return data[byte]; }
void update( uint32_t & crc, const uint8_t byte ) const throw()
{ crc = data[(crc^byte)&0xFF] ^ ( crc >> 8 ); }
void update( uint32_t & crc, const uint8_t * const buffer, const int size ) const throw()
{
for( int i = 0; i < size; ++i )
crc = data[(crc^buffer[i])&0xFF] ^ ( crc >> 8 );
}
};
extern const CRC32 crc32;
const char * const magic_string = "LZIP";
const uint8_t magic_string[4] = { 'L', 'Z', 'I', 'P' };
struct File_header
{
char magic[4];
uint8_t magic[4];
uint8_t version;
uint8_t coded_dict_size;