compression.c File Reference

#include <math.h>
#include "globals.h"
#include "bitio.h"
#include "compression.h"

Defines

Functions


Define Documentation

#define log2 (  )     (log(x)/log(2.0))

doesn't seem to exist outside Solaris, so we define it here

Referenced by read_golomb_code_bf(), read_golomb_code_bs(), and write_golomb_code().


Function Documentation

int compute_ba ( int  ft,
int  corpus_size 
)

{I have no idea what this does -- AH}

Parameters:
ft ??
corpus_size ??
Returns:
??

Referenced by compress_reversed_index(), decompress_check_reversed_index(), get_positions(), and OpenPositionStream().

int read_golomb_code_bf ( int  b,
BFile bf 
)

Reads an integer from a Golomb-coded bit-file-buffer.

Parameters:
b ???
bf The bit-filem to read from.
Returns:
The integer that is read.

References BFread(), and log2.

Referenced by decompress_check_reversed_index().

int read_golomb_code_bs ( int  b,
BStream bs 
)

Reads an integer from a Golomb-coded bitstream.

Parameters:
b ???
bs The bitstream to read from.
Returns:
The integer that is read.

References BSread(), and log2.

Referenced by get_positions(), and ReadPositionStream().

int write_golomb_code ( int  x,
int  b,
BFile bf 
)

Writes an integer to a Golomb-coded bit-file-buffer.

Parameters:
x Integer to write
b ???
bf The bit-file to read from.
Returns:
Always 1.

References BFwrite(), BFwriteWord(), and log2.

Referenced by compress_reversed_index().


Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1