summaryrefslogtreecommitdiffstats
path: root/tarlz.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-09 05:52:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-09 05:53:03 +0000
commit882d8d8da4a8b4a332458c4f01b03d81c2c08c78 (patch)
treed7acd130c7201183b14adfa8e095e79eb1f49bbe /tarlz.h
parentReleasing debian version 0.21-3. (diff)
downloadtarlz-882d8d8da4a8b4a332458c4f01b03d81c2c08c78.tar.xz
tarlz-882d8d8da4a8b4a332458c4f01b03d81c2c08c78.zip
Merging upstream version 0.22.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tarlz.h')
-rw-r--r--tarlz.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tarlz.h b/tarlz.h
index 3323e60..19c913a 100644
--- a/tarlz.h
+++ b/tarlz.h
@@ -1,5 +1,5 @@
/* Tarlz - Archiver with multimember lzip compression
- Copyright (C) 2013-2021 Antonio Diaz Diaz.
+ Copyright (C) 2013-2022 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
@@ -201,6 +201,7 @@ public:
void update_byte( uint32_t & crc, const uint8_t byte ) const
{ crc = data[(crc^byte)&0xFF] ^ ( crc >> 8 ); }
+ // about as fast as it is possible without messing with endianness
void update_buf( uint32_t & crc, const uint8_t * const buffer,
const int size ) const
{
@@ -392,6 +393,9 @@ struct Cl_options // command line options
};
+inline void set_retval( int & retval, const int new_val )
+ { if( retval < new_val ) retval = new_val; }
+
const char * const bad_magic_msg = "Bad magic number (file not in lzip format).";
const char * const bad_dict_msg = "Invalid dictionary size in member header.";
const char * const corrupt_mm_msg = "Corrupt header in multimember file.";