#include <math.h>#include "globals.h"#include "bitio.h"#include "compression.h"| #define log2 | ( | x | ) | (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().
| int compute_ba | ( | int | ft, | |
| int | corpus_size | |||
| ) |
{I have no idea what this does -- AH}
| ft | ?? | |
| corpus_size | ?? |
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.
| b | ??? | |
| bf | The bit-filem to read from. |
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.
| b | ??? | |
| bs | The bitstream to read from. |
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.
| x | Integer to write | |
| b | ??? | |
| bf | The bit-file to read from. |
References BFwrite(), BFwriteWord(), and log2.
Referenced by compress_reversed_index().
1.6.1