Public Member Functions | Private Attributes | List of all members
rosbag::BZ2Stream Class Reference

#include <stream.h>

Inheritance diagram for rosbag::BZ2Stream:
Inheritance graph
[legend]

Public Member Functions

 BZ2Stream (ChunkedFile *file)
 
void decompress (uint8_t *dest, unsigned int dest_len, uint8_t *source, unsigned int source_len)
 
CompressionType getCompressionType () const
 
void read (void *ptr, size_t size)
 
void startRead ()
 
void startWrite ()
 
void stopRead ()
 
void stopWrite ()
 
void write (void *ptr, size_t size)
 
- Public Member Functions inherited from rosbag::Stream
 Stream (ChunkedFile *file)
 
virtual ~Stream ()
 

Private Attributes

int block_size_100k_
 compression block size (1-9; 9 default). 9 is best compression, most memory More...
 
int bzerror_
 last error from bzlib More...
 
BZFILE * bzfile_
 bzlib compressed file stream More...
 
int verbosity_
 level of debugging output (0-4; 0 default). 0 is silent, 4 is max verbose debugging output More...
 
int work_factor_
 compression behavior for worst case, highly repetitive data (0-250; 30 default) More...
 

Additional Inherited Members

- Protected Member Functions inherited from rosbag::Stream
void advanceOffset (uint64_t nbytes)
 
void clearUnused ()
 
uint64_t getCompressedIn ()
 
FILE * getFilePointer ()
 
char * getUnused ()
 
int getUnusedLength ()
 
void setCompressedIn (uint64_t nbytes)
 
void setUnused (char *unused)
 
void setUnusedLength (int nUnused)
 
- Protected Attributes inherited from rosbag::Stream
ChunkedFilefile_
 

Detailed Description

BZ2Stream uses libbzip2 (http://www.bzip.org) for reading/writing compressed data in the BZ2 format.

Definition at line 139 of file stream.h.

Constructor & Destructor Documentation

◆ BZ2Stream()

rosbag::BZ2Stream::BZ2Stream ( ChunkedFile file)

Definition at line 45 of file bz2_stream.cpp.

Member Function Documentation

◆ decompress()

void rosbag::BZ2Stream::decompress ( uint8_t *  dest,
unsigned int  dest_len,
uint8_t *  source,
unsigned int  source_len 
)
virtual

Implements rosbag::Stream.

Definition at line 159 of file bz2_stream.cpp.

◆ getCompressionType()

CompressionType rosbag::BZ2Stream::getCompressionType ( ) const
virtual

Implements rosbag::Stream.

Definition at line 54 of file bz2_stream.cpp.

◆ read()

void rosbag::BZ2Stream::read ( void *  ptr,
size_t  size 
)
virtual

Implements rosbag::Stream.

Definition at line 117 of file bz2_stream.cpp.

◆ startRead()

void rosbag::BZ2Stream::startRead ( )
virtual

Reimplemented from rosbag::Stream.

Definition at line 103 of file bz2_stream.cpp.

◆ startWrite()

void rosbag::BZ2Stream::startWrite ( )
virtual

Reimplemented from rosbag::Stream.

Definition at line 58 of file bz2_stream.cpp.

◆ stopRead()

void rosbag::BZ2Stream::stopRead ( )
virtual

Reimplemented from rosbag::Stream.

Definition at line 147 of file bz2_stream.cpp.

◆ stopWrite()

void rosbag::BZ2Stream::stopWrite ( )
virtual

Reimplemented from rosbag::Stream.

Definition at line 86 of file bz2_stream.cpp.

◆ write()

void rosbag::BZ2Stream::write ( void *  ptr,
size_t  size 
)
virtual

Implements rosbag::Stream.

Definition at line 72 of file bz2_stream.cpp.

Member Data Documentation

◆ block_size_100k_

int rosbag::BZ2Stream::block_size_100k_
private

compression block size (1-9; 9 default). 9 is best compression, most memory

Definition at line 158 of file stream.h.

◆ bzerror_

int rosbag::BZ2Stream::bzerror_
private

last error from bzlib

Definition at line 162 of file stream.h.

◆ bzfile_

BZFILE* rosbag::BZ2Stream::bzfile_
private

bzlib compressed file stream

Definition at line 161 of file stream.h.

◆ verbosity_

int rosbag::BZ2Stream::verbosity_
private

level of debugging output (0-4; 0 default). 0 is silent, 4 is max verbose debugging output

Definition at line 157 of file stream.h.

◆ work_factor_

int rosbag::BZ2Stream::work_factor_
private

compression behavior for worst case, highly repetitive data (0-250; 30 default)

Definition at line 159 of file stream.h.


The documentation for this class was generated from the following files:


rosbag_storage
Author(s): Dirk Thomas
autogenerated on Mon Feb 28 2022 23:33:55