35 #ifndef ROSBAG_CHUNKED_FILE_H
36 #define ROSBAG_CHUNKED_FILE_H
42 #include <boost/shared_ptr.hpp>
59 void openWrite (std::string
const& filename);
60 void openRead (std::string
const& filename);
61 void openReadWrite(std::string
const& filename);
65 std::string getFileName()
const;
66 uint64_t getOffset()
const;
67 uint32_t getCompressedBytesIn()
const;
75 void write(std::string
const& s);
76 void write(
void* ptr,
size_t size);
77 void read(
void* ptr,
size_t size);
78 std::string getline();
79 bool truncate(uint64_t length);
80 void seek(uint64_t offset,
int origin = std::ios_base::beg);
81 void decompress(
CompressionType compression, uint8_t* dest,
unsigned int dest_len, uint8_t* source,
unsigned int source_len);
82 void swap(ChunkedFile& other);
88 void open(std::string
const& filename, std::string
const& mode);
92 std::string filename_;
95 uint64_t compressed_in_;