summaryrefslogtreecommitdiffstats
path: root/file_index.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--file_index.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/file_index.h b/file_index.h
index eff1157..5084fcb 100644
--- a/file_index.h
+++ b/file_index.h
@@ -20,10 +20,11 @@ class File_index
struct Member
{
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 )
- : dblock( dp, ds ), mblock( mp, ms ) {}
+ const long long mp, const long long ms, const unsigned dict_size )
+ : dblock( dp, ds ), mblock( mp, ms ), dictionary_size( dict_size ) {}
bool operator==( const Member & m ) const { return ( mblock == m.mblock ); }
bool operator!=( const Member & m ) const { return ( mblock != m.mblock ); }
@@ -36,10 +37,10 @@ class File_index
void set_errno_error( const char * const msg );
void set_num_error( const char * const msg1, unsigned long long num,
- const char * const msg2 = "." );
+ const char * const msg2 = "" );
public:
- File_index() : error_( "No index." ), isize( 0 ), retval_( 2 ) {}
+ File_index() : error_( "No index" ), isize( 0 ), retval_( 2 ) {}
explicit File_index( const int infd );
File_index( const std::vector< int > & infd_vector, const long long fsize );
@@ -65,7 +66,7 @@ public:
{ if( member_vector.size() ) return member_vector.back().mblock.end();
else return 0; }
- // total size including trailing garbage (if any)
+ // total size including trailing data (if any)
long long file_size() const
{ if( isize >= 0 ) return isize; else return 0; }
@@ -73,4 +74,6 @@ public:
{ return member_vector[i].dblock; }
const Block & mblock( const long i ) const
{ return member_vector[i].mblock; }
+ unsigned dictionary_size( const long i ) const
+ { return member_vector[i].dictionary_size; }
};