46 :
Stream(file), block_size_id_(6) {
90 throw BagIOException(
"ROSLZ4_OUTPUT_SMALL: output buffer is too small");
129 throw BagException(
"Too many unused bytes to decompress");
143 int nread =
static_cast<int>(fread(input_start, 1, to_read,
getFilePointer()));
171 throw BagIOException(
"Reached end of file before reaching end of stream");
188 unsigned int actual_dest_len = dest_len;
190 (
char*)dest, &actual_dest_len);
199 if (actual_dest_len != dest_len) {
200 throw BagException(
"Decompression size mismatch in LZ4 chunk");
void roslz4_compressEnd(roslz4_stream *stream)
const int ROSLZ4_MEMORY_ERROR
uint64_t getCompressedIn()
LZ4Stream(ChunkedFile *file)
ChunkedFile reads and writes files which contain interleaved chunks of compressed and uncompressed da...
void setUnusedLength(int nUnused)
int roslz4_blockSizeFromIndex(int block_id)
int roslz4_compress(roslz4_stream *stream, int action)
Base class for rosbag exceptions.
const int ROSLZ4_OUTPUT_SMALL
GLsizei const GLchar *const * string
void read(void *ptr, size_t size)
int roslz4_decompressStart(roslz4_stream *stream)
void write(void *ptr, size_t size)
void decompress(uint8_t *dest, unsigned int dest_len, uint8_t *source, unsigned int source_len)
int roslz4_buffToBuffDecompress(char *input, unsigned int input_size, char *output, unsigned int *output_size)
const int ROSLZ4_STREAM_END
void advanceOffset(uint64_t nbytes)
const int ROSLZ4_PARAM_ERROR
void roslz4_decompressEnd(roslz4_stream *str)
Exception thrown when on IO problems.
const int ROSLZ4_DATA_ERROR
void setCompressedIn(uint64_t nbytes)
int roslz4_compressStart(roslz4_stream *stream, int block_size_id)
int roslz4_decompress(roslz4_stream *stream)
void setUnused(char *unused)
void writeStream(int action)
GLsizei GLsizei GLchar * source
CompressionType getCompressionType() const
#define CONSOLE_BRIDGE_logError(fmt,...)