X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=trace_snappyfile.hpp;h=33159ec73cc81eb4413158de707940a2c64c5211;hb=9d50fbb84f9b3086aa8e985e32534961336563b2;hp=f1623b9c737f11d800b16120df302b95bcda8279;hpb=5f78882308c311b42c88e14e261289dd4208f4d7;p=apitrace diff --git a/trace_snappyfile.hpp b/trace_snappyfile.hpp index f1623b9..33159ec 100644 --- a/trace_snappyfile.hpp +++ b/trace_snappyfile.hpp @@ -62,7 +62,8 @@ protected: virtual int rawGetc(); virtual void rawClose(); virtual void rawFlush(); - virtual bool rawSkip(unsigned length); + virtual bool rawSkip(size_t length); + virtual int rawPercentRead(); private: inline size_t usedCacheSize() const @@ -84,7 +85,7 @@ private: return m_stream.eof() && freeCacheSize() == 0; } void flushWriteCache(); - void flushReadCache(); + void flushReadCache(size_t skipLength = 0); void createCache(size_t size); void writeCompressedLength(size_t length); size_t readCompressedLength(); @@ -97,6 +98,7 @@ private: char *m_compressedCache; File::Offset m_currentOffset; + std::streampos m_endPos; }; }