Classes | Macros | Functions | Variables
lz4s.c File Reference
#include "roslz4/lz4s.h"
#include "xxhash.h"
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for lz4s.c:

Go to the source code of this file.

Classes

struct  stream_state
 

Macros

#define DEBUG(...)
 
#define LZ4_COMPRESS_DEFAULT   LZ4_compress_limitedOutput
 
#define LZ4_VERSION   (LZ4_VERSION_MAJOR * 100 * 100 + LZ4_VERSION_MINOR * 100 + LZ4_VERSION_RELEASE)
 

Functions

void advanceInput (roslz4_stream *str, int nbytes)
 
void advanceOutput (roslz4_stream *str, int nbytes)
 
int bufferToOutput (roslz4_stream *str)
 
int decompressBlock (roslz4_stream *str)
 
void fillUInt32 (roslz4_stream *str, uint32_t *dest_val, int *offset)
 
int inputToBuffer (roslz4_stream *str)
 
int min (int a, int b)
 
int processHeader (roslz4_stream *str)
 
int readBlock (roslz4_stream *str)
 
int readBlockSize (roslz4_stream *str)
 
int readChecksum (roslz4_stream *str)
 
uint32_t readUInt32 (unsigned char *buffer)
 
int roslz4_blockSizeFromIndex (int block_id)
 
int roslz4_buffToBuffCompress (char *input, unsigned int input_size, char *output, unsigned int *output_size, int block_size_id)
 
int roslz4_buffToBuffDecompress (char *input, unsigned int input_size, char *output, unsigned int *output_size)
 
int roslz4_compress (roslz4_stream *str, int action)
 
void roslz4_compressEnd (roslz4_stream *str)
 
int roslz4_compressStart (roslz4_stream *str, int block_size_id)
 
int roslz4_decompress (roslz4_stream *str)
 
void roslz4_decompressEnd (roslz4_stream *str)
 
int roslz4_decompressStart (roslz4_stream *str)
 
int streamResizeBuffer (roslz4_stream *str, int block_size_id)
 
int streamStateAlloc (roslz4_stream *str)
 
void streamStateFree (roslz4_stream *str)
 
int writeEOS (roslz4_stream *str)
 
int writeHeader (roslz4_stream *str)
 
void writeUInt32 (unsigned char *buffer, uint32_t val)
 

Variables

const uint8_t k1Bits = 0x01
 
const uint8_t k2Bits = 0x03
 
const uint8_t k3Bits = 0x07
 
const uint8_t k4Bits = 0x0F
 
const uint8_t k8Bits = 0xFF
 
const uint32_t kEndOfStream = 0x00000000
 
const uint32_t kMagicNumber = 0x184D2204
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   ...)

Definition at line 47 of file lz4s.c.

◆ LZ4_COMPRESS_DEFAULT

#define LZ4_COMPRESS_DEFAULT   LZ4_compress_limitedOutput

Definition at line 57 of file lz4s.c.

◆ LZ4_VERSION

#define LZ4_VERSION   (LZ4_VERSION_MAJOR * 100 * 100 + LZ4_VERSION_MINOR * 100 + LZ4_VERSION_RELEASE)

Definition at line 53 of file lz4s.c.

Function Documentation

◆ advanceInput()

void advanceInput ( roslz4_stream str,
int  nbytes 
)

Definition at line 116 of file lz4s.c.

◆ advanceOutput()

void advanceOutput ( roslz4_stream str,
int  nbytes 
)

Definition at line 122 of file lz4s.c.

◆ bufferToOutput()

int bufferToOutput ( roslz4_stream str)

Definition at line 182 of file lz4s.c.

◆ decompressBlock()

int decompressBlock ( roslz4_stream str)

Definition at line 489 of file lz4s.c.

◆ fillUInt32()

void fillUInt32 ( roslz4_stream str,
uint32_t *  dest_val,
int *  offset 
)

Definition at line 128 of file lz4s.c.

◆ inputToBuffer()

int inputToBuffer ( roslz4_stream str)

Definition at line 226 of file lz4s.c.

◆ min()

int min ( int  a,
int  b 
)

Definition at line 84 of file lz4s.c.

◆ processHeader()

int processHeader ( roslz4_stream str)

Definition at line 378 of file lz4s.c.

◆ readBlock()

int readBlock ( roslz4_stream str)

Definition at line 473 of file lz4s.c.

◆ readBlockSize()

int readBlockSize ( roslz4_stream str)

Definition at line 453 of file lz4s.c.

◆ readChecksum()

int readChecksum ( roslz4_stream str)

Definition at line 531 of file lz4s.c.

◆ readUInt32()

uint32_t readUInt32 ( unsigned char *  buffer)

Definition at line 71 of file lz4s.c.

◆ roslz4_blockSizeFromIndex()

int roslz4_blockSizeFromIndex ( int  block_id)

Definition at line 319 of file lz4s.c.

◆ roslz4_buffToBuffCompress()

int roslz4_buffToBuffCompress ( char *  input,
unsigned int  input_size,
char *  output,
unsigned int *  output_size,
int  block_size_id 
)

Definition at line 585 of file lz4s.c.

◆ roslz4_buffToBuffDecompress()

int roslz4_buffToBuffDecompress ( char *  input,
unsigned int  input_size,
char *  output,
unsigned int *  output_size 
)

Definition at line 619 of file lz4s.c.

◆ roslz4_compress()

int roslz4_compress ( roslz4_stream str,
int  action 
)

Definition at line 329 of file lz4s.c.

◆ roslz4_compressEnd()

void roslz4_compressEnd ( roslz4_stream str)

Definition at line 365 of file lz4s.c.

◆ roslz4_compressStart()

int roslz4_compressStart ( roslz4_stream str,
int  block_size_id 
)

Definition at line 323 of file lz4s.c.

◆ roslz4_decompress()

int roslz4_decompress ( roslz4_stream str)

Definition at line 548 of file lz4s.c.

◆ roslz4_decompressEnd()

void roslz4_decompressEnd ( roslz4_stream str)

Definition at line 579 of file lz4s.c.

◆ roslz4_decompressStart()

int roslz4_decompressStart ( roslz4_stream str)

Definition at line 371 of file lz4s.c.

◆ streamResizeBuffer()

int streamResizeBuffer ( roslz4_stream str,
int  block_size_id 
)

Definition at line 289 of file lz4s.c.

◆ streamStateAlloc()

int streamStateAlloc ( roslz4_stream str)

Definition at line 247 of file lz4s.c.

◆ streamStateFree()

void streamStateFree ( roslz4_stream str)

Definition at line 305 of file lz4s.c.

◆ writeEOS()

int writeEOS ( roslz4_stream str)

Definition at line 161 of file lz4s.c.

◆ writeHeader()

int writeHeader ( roslz4_stream str)

Definition at line 136 of file lz4s.c.

◆ writeUInt32()

void writeUInt32 ( unsigned char *  buffer,
uint32_t  val 
)

Definition at line 76 of file lz4s.c.

Variable Documentation

◆ k1Bits

const uint8_t k1Bits = 0x01

Definition at line 65 of file lz4s.c.

◆ k2Bits

const uint8_t k2Bits = 0x03

Definition at line 66 of file lz4s.c.

◆ k3Bits

const uint8_t k3Bits = 0x07

Definition at line 67 of file lz4s.c.

◆ k4Bits

const uint8_t k4Bits = 0x0F

Definition at line 68 of file lz4s.c.

◆ k8Bits

const uint8_t k8Bits = 0xFF

Definition at line 69 of file lz4s.c.

◆ kEndOfStream

const uint32_t kEndOfStream = 0x00000000

Definition at line 62 of file lz4s.c.

◆ kMagicNumber

const uint32_t kMagicNumber = 0x184D2204

Definition at line 61 of file lz4s.c.



roslz4
Author(s): Ben Charrow
autogenerated on Mon Aug 10 2020 03:18:33