diff options
Diffstat (limited to 'pdf/chunk_stream.h')
-rw-r--r-- | pdf/chunk_stream.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pdf/chunk_stream.h b/pdf/chunk_stream.h index fac1ec6..048f958 100644 --- a/pdf/chunk_stream.h +++ b/pdf/chunk_stream.h @@ -8,6 +8,7 @@ #include <stddef.h> #include <map> +#include <utility> #include <vector> namespace chrome_pdf { @@ -33,16 +34,20 @@ class ChunkStream { bool IsRangeAvailable(size_t offset, size_t size) const; size_t GetFirstMissingByte() const; - size_t GetLastByteBefore(size_t offset) const; - size_t GetFirstByteAfter(size_t offset) const; + // Finds the first byte of the missing byte interval that offset belongs to. + size_t GetFirstMissingByteInInterval(size_t offset) const; + // Returns the last byte of the missing byte interval that offset belongs to. + size_t GetLastMissingByteInInterval(size_t offset) const; private: std::vector<unsigned char> data_; // Pair, first - begining of the chunk, second - size of the chunk. std::map<size_t, size_t> chunks_; + + size_t stream_size_; }; }; // namespace chrome_pdf -#endif +#endif // PDF_CHUNK_STREAM_H_ |