CWB
Functions

compression.h File Reference

#include "globals.h"
#include "bitio.h"

Functions


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 cl_id2cpos_oldstyle(), cl_new_stream(), compress_reversed_index(), and decompress_check_reversed_index().

int read_golomb_code_bf ( int  b,
BFile bf 
)

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

Parameters:
b???
bfThe 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???
bsThe bitstream to read from.
Returns:
The integer that is read.

References BSread(), and log2.

Referenced by cl_id2cpos_oldstyle(), and cl_read_stream().

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

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

Parameters:
xInteger to write
b???
bfThe bit-file to read from.
Returns:
Always 1.

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

Referenced by compress_reversed_index().