35 #ifndef ROSBAG_STREAM_H
36 #define ROSBAG_STREAM_H
42 #include <boost/shared_ptr.hpp>
70 friend class FileAccessor;
72 Stream(ChunkedFile* file);
77 virtual void write(
void* ptr,
size_t size) = 0;
78 virtual void read (
void* ptr,
size_t size) = 0;
80 virtual void decompress(uint8_t* dest,
unsigned int dest_len, uint8_t* source,
unsigned int source_len) = 0;
82 virtual void startWrite();
83 virtual void stopWrite();
85 virtual void startRead();
86 virtual void stopRead();
89 FILE* getFilePointer();
90 uint64_t getCompressedIn();
91 void setCompressedIn(uint64_t nbytes);
92 void advanceOffset(uint64_t nbytes);
94 int getUnusedLength();
95 void setUnused(
char* unused);
96 void setUnusedLength(
int nUnused);
126 UncompressedStream(ChunkedFile* file);
130 void write(
void* ptr,
size_t size);
131 void read(
void* ptr,
size_t size);
133 void decompress(uint8_t* dest,
unsigned int dest_len, uint8_t* source,
unsigned int source_len);
147 void write(
void* ptr,
size_t size);
151 void read(
void* ptr,
size_t size);
154 void decompress(uint8_t* dest,
unsigned int dest_len, uint8_t* source,
unsigned int source_len);
158 int block_size_100k_;
176 void write(
void* ptr,
size_t size);
180 void read(
void* ptr,
size_t size);
183 void decompress(uint8_t* dest,
unsigned int dest_len, uint8_t* source,
unsigned int source_len);
188 void writeStream(
int action);