Changeset 15266 for trunk/Mars/mcore
- Timestamp:
- 04/06/13 12:19:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/izstream.h
r11806 r15266 20 20 { 21 21 private: 22 static const int fgBufferSize = 3276804; // maximum size of a fact event + 422 static const int fgBufferSize = 2048*1024*2; 23 23 24 gzFile fFile; 25 char fBuffer[fgBufferSize]; // data buffer24 gzFile fFile; // file handle for compressed file 25 char *fBuffer; // data buffer 26 26 27 27 int underflow() … … 56 56 izstream() : std::istream(this), fFile(0) 57 57 { 58 fBuffer = new char[fgBufferSize]; 58 59 setg(fBuffer+4, fBuffer+4, fBuffer+4); 59 60 } 60 61 izstream(const char *name) : std::istream(this), fFile(0) 61 62 { 63 fBuffer = new char[fgBufferSize]; 62 64 setg(fBuffer+4, fBuffer+4, fBuffer+4); 63 65 open(name); 64 66 } 65 ~izstream() { izstream::close(); }67 ~izstream() { izstream::close(); delete [] fBuffer; } 66 68 67 69 int is_open() { return fFile!=0; }
Note:
See TracChangeset
for help on using the changeset viewer.