summaryrefslogtreecommitdiffstats
path: root/lzip.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:41:41 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:41:41 +0000
commit9317e4b89644635a9ce309c4626d917d886ae20b (patch)
tree768c1cbb87e5c29ddcfcf2853ff1d5ce5b511e6b /lzip.h
parentAdding debian version 1.14-1. (diff)
downloadlziprecover-9317e4b89644635a9ce309c4626d917d886ae20b.tar.xz
lziprecover-9317e4b89644635a9ce309c4626d917d886ae20b.zip
Merging upstream version 1.15~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'lzip.h')
-rw-r--r--lzip.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lzip.h b/lzip.h
index fcad09e..ea02a5f 100644
--- a/lzip.h
+++ b/lzip.h
@@ -195,7 +195,7 @@ struct File_header
{ return ( std::memcmp( data, magic_string, 4 ) == 0 ); }
uint8_t version() const { return data[4]; }
- bool verify_version() const { return ( data[4] <= 1 ); }
+ bool verify_version() const { return ( data[4] == 1 ); }
unsigned dictionary_size() const
{
@@ -231,8 +231,7 @@ struct File_trailer
// 4-11 size of the uncompressed data
// 12-19 member size including header and trailer
- static int size( const int version = 1 )
- { return ( ( version >= 1 ) ? 20 : 12 ); }
+ enum { size = 20 };
unsigned data_crc() const
{
@@ -301,16 +300,15 @@ void cleanup_and_fail( const std::string & output_filename,
const int outfd, const int retval );
bool copy_file( const int infd, const int outfd,
const long long max_size = -1 );
-bool try_decompress( const int fd, const unsigned long long file_size,
- long long * failure_posp = 0 );
+bool try_decompress_member( const int fd, const unsigned long long msize,
+ long long * failure_posp = 0 );
bool verify_header( const File_header & header, const int verbosity );
-bool verify_single_member( const int fd, const long long file_size,
- const int verbosity );
int merge_files( const std::vector< std::string > & filenames,
const std::string & output_filename, const int verbosity,
const bool force );
// defined in range_dec.cc
+bool safe_seek( const int fd, const long long pos );
int list_files( const std::vector< std::string > & filenames,
const int verbosity );
int range_decompress( const std::string & input_filename,