4 #include "zipios++/zipios-config.h" 8 #include "zipios++/meta-iostreams.h" 43 int chunk_size = 1024 ) ;
51 inline int readChunk(
int &read_pointer ) ;
63 _chunk_size( chunk_size ),
66 _vs.vseekg( is, 0, ios::end ) ;
67 _file_pos = _vs.vtellg( is ) ;
77 _chunk_size = min<int> (
static_cast< int >( _file_pos ), _chunk_size ) ;
78 _file_pos -= _chunk_size ;
79 _vs.vseekg( _is, _file_pos, ios::beg ) ;
81 insert ( begin(), _chunk_size, static_cast< char > ( 0 ) ) ;
84 readByteSeq ( _is, &( (*
this)[ 0 ] ), _chunk_size ) ;
85 read_pointer += _chunk_size ;
BackBuffer(istream &is, VirtualSeeker vs=VirtualSeeker(), int chunk_size=1024)
BackBuffer constructor.
A BackBuffer instance is useful for reading the last part of a file in an efficient manner...
int readChunk(int &read_pointer)
Reads another chunk and returns the size of the chunk that has been read.
Header file containing classes and functions for reading the central directory and local header field...
Header file that defines I/O functions for the header structures defined in ziphead.h.
VirtualSeeker is a simple class that keeps track of a set of specified 'virtual' file endings that ma...
An FCollException is used to signal a problem with a FileCollection.
Header file that defines a number of exceptions used by FileCollection and its subclasses.
Header file that defines VirtualSeeker.
Header file containing miscellaneous small functions.