diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:08:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:08:19 +0000 |
commit | cb1387c92038634c063ee06a24e249b87525f519 (patch) | |
tree | aeebf76566be407c42678fff1c2482ee9dc8fe17 /lzip_index.h | |
parent | Releasing debian version 0.23-3. (diff) | |
download | tarlz-cb1387c92038634c063ee06a24e249b87525f519.tar.xz tarlz-cb1387c92038634c063ee06a24e249b87525f519.zip |
Merging upstream version 0.25.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lzip_index.h')
-rw-r--r-- | lzip_index.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lzip_index.h b/lzip_index.h index af8aaa4..822f537 100644 --- a/lzip_index.h +++ b/lzip_index.h @@ -1,5 +1,5 @@ /* Tarlz - Archiver with multimember lzip compression - Copyright (C) 2013-2022 Antonio Diaz Diaz. + Copyright (C) 2013-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 @@ -22,7 +22,7 @@ class Block { - long long pos_, size_; // pos + size <= INT64_MAX + long long pos_, size_; // pos >= 0, size >= 0, pos + size <= INT64_MAX public: Block( const long long p, const long long s ) : pos_( p ), size_( s ) {} @@ -43,9 +43,11 @@ class Lzip_index Block dblock, mblock; // data block, member block unsigned dictionary_size; - Member( const long long dp, const long long ds, - const long long mp, const long long ms, const unsigned dict_size ) - : dblock( dp, ds ), mblock( mp, ms ), dictionary_size( dict_size ) {} + Member( const long long dpos, const long long dsize, + const long long mpos, const long long msize, + const unsigned dict_size ) + : dblock( dpos, dsize ), mblock( mpos, msize ), + dictionary_size( dict_size ) {} }; std::vector< Member > member_vector; @@ -55,16 +57,14 @@ class Lzip_index unsigned dictionary_size_; // largest dictionary size in the file bool bad_magic_; // bad magic in first header - bool check_header_error( const Lzip_header & header, const bool first ); + bool check_header( const Lzip_header & header, const bool first ); void set_errno_error( const char * const msg ); void set_num_error( const char * const msg, unsigned long long num ); bool read_header( const int fd, Lzip_header & header, const long long pos ); - bool skip_trailing_data( const int fd, unsigned long long & pos, - const bool ignore_trailing, const bool loose_trailing ); + bool skip_trailing_data( const int fd, unsigned long long & pos ); public: - Lzip_index( const int infd, const bool ignore_trailing, - const bool loose_trailing ); + Lzip_index( const int infd ); long members() const { return member_vector.size(); } const std::string & error() const { return error_; } |