lzo.c File Reference

Go to the source code of this file.

Classes

struct  LZOContext

Functions

static int get_byte (LZOContext *c)
 read one byte from input buffer, avoiding overrun
static int get_len (LZOContext *c, int x, int mask)
 decode a length value in the coding used by lzo
static void copy (LZOContext *c, int cnt)
 copy bytes from input to output buffer with checking
static void copy_backptr (LZOContext *c, int back, int cnt)
 copy previously decoded bytes to current position
int lzo1x_decode (void *out, int *outlen, void *in, int *inlen)
 decode LZO 1x compressed data
int main (int argc, char *argv[])


Function Documentation

static int get_byte ( LZOContext c  )  [inline, static]

read one byte from input buffer, avoiding overrun

Returns:
byte read

Definition at line 41 of file lzo.c.

static int get_len ( LZOContext c,
int  x,
int  mask 
) [inline, static]

decode a length value in the coding used by lzo

Parameters:
x previous byte value
mask bits used from x
Returns:
decoded length value

Definition at line 60 of file lzo.c.

Referenced by lzo1x_decode().

static void copy ( LZOContext c,
int  cnt 
) [inline, static]

copy bytes from input to output buffer with checking

Parameters:
cnt number of bytes to copy, must be >= 0

Definition at line 86 of file lzo.c.

Referenced by Channel::__construct(), AvFormatDecoder::GenerateDummyVideoFrame(), DataDirectProcessor::GrabData(), lzo1x_decode(), qpeg_decode_intra(), roq_decode_frame(), strDup(), strDupSize(), and trail_space().

static void copy_backptr ( LZOContext c,
int  back,
int  cnt 
) [inline, static]

copy previously decoded bytes to current position

Parameters:
back how many bytes back we start
cnt number of bytes to copy, must be >= 0
cnt > back is valid, this will copy the bytes we just copied, thus creating a repeating pattern with a period length of back.

Definition at line 117 of file lzo.c.

Referenced by lzo1x_decode().

int lzo1x_decode ( void *  out,
int *  outlen,
void *  in,
int *  inlen 
)

decode LZO 1x compressed data

Parameters:
out output buffer
outlen size of output buffer, number of bytes left are returned here
in input buffer
inlen size of input buffer, number of bytes left are returned here
Returns:
0 on success, otherwise error flags, see lzo.h
make sure all buffers are appropriately padded, in must provide LZO_INPUT_PADDING, out must provide LZO_OUTPUT_PADDING additional bytes

Definition at line 174 of file lzo.c.

Referenced by decode_frame(), and main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 242 of file lzo.c.


Generated on Sat Dec 18 05:15:53 2010 for MythTV by  doxygen 1.5.5