35 #ifndef ROSBAG_STREAM_H 36 #define ROSBAG_STREAM_H 42 #include <boost/shared_ptr.hpp> 75 virtual CompressionType getCompressionType()
const = 0;
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);
128 CompressionType getCompressionType()
const;
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);
144 CompressionType getCompressionType()
const;
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);
173 CompressionType getCompressionType()
const;
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);
#define ROSBAG_STORAGE_DECL
ChunkedFile reads and writes files which contain interleaved chunks of compressed and uncompressed da...
int verbosity_
level of debugging output (0-4; 0 default). 0 is silent, 4 is max verbose debugging output ...
boost::shared_ptr< Stream > lz4_stream_
int block_size_100k_
compression block size (1-9; 9 default). 9 is best compression, most memory
int work_factor_
compression behavior for worst case, highly repetitive data (0-250; 30 default)
static void setFile(Stream &a, ChunkedFile *file)
BZFILE * bzfile_
bzlib compressed file stream
boost::shared_ptr< Stream > bz2_stream_
boost::shared_ptr< Stream > uncompressed_stream_
int bzerror_
last error from bzlib