Changeset 11424


Ignore:
Timestamp:
07/15/11 15:43:08 (13 years ago)
Author:
tbretz
Message:
Fixed seeking in gzipped files; increased buffer size
Location:
trunk/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MZlib.cc

    r9195 r11424  
    138138    if (dir==ios::cur)
    139139    {
    140         // Position in z-stream
    141         const z_off_t zpos = gztell(fFile); //gzseek(fFile, 0, SEEK_CUR);
    142 
    143140        // Calculate future position in streambuffer
    144141        const char *ptr = gptr()+offset;
     142
     143        // Position in z-stream
     144        const z_off_t zpos = gztell(fFile)+gptr()-egptr(); //gzseek(fFile, 0, SEEK_CUR);
    145145
    146146        // Check if the new position will still be in the buffer
  • trunk/Mars/mbase/MZlib.h

    r7786 r11424  
    1818{
    1919private:
    20     static const int fgBufferSize = 47+256; // size of data buff totals 512 bytes under g++ for igzstream at the end.
     20    static const int fgBufferSize = 3276804; // maximum size of a fact event + 4
    2121
    2222    gzFile fFile;                 // file handle for compressed file
Note: See TracChangeset for help on using the changeset viewer.