Colibri Core
Classes | Functions
classdecoder.h File Reference

Class for decoding binary class-encoded data back to plain-text. More...

#include <unordered_map>
#include <string>
#include <vector>
#include <istream>
#include <fstream>

Go to the source code of this file.

Classes

class  ClassDecoder
 Class for decoding binary class-encoded data back to plain-text. The ClassDecoder maintains a mapping of classes (integers) to words. It allows decoding of a corpus that was losslessly compressed by substituting words for classes. The classes are distributed based on word frequency, with frequent words receiving a lower class number that can be represented in fewer bytes, and rare words receiving a higher class number. More...
 

Functions

unsigned int bytestoint (std::istream *IN, const unsigned char version=2)
 
unsigned int bytestoint (const unsigned char *a, unsigned int *length=NULL)
 
unsigned int bytestoint_v1 (const unsigned char *a, const int l)
 
unsigned char getdataversion (std::istream *IN)
 
int readline (std::istream *IN, unsigned char *buffer, const int)
 

Detailed Description

Class for decoding binary class-encoded data back to plain-text.

Author
Maarten van Gompel (proycon) proyc.nosp@m.on@a.nosp@m.napro.nosp@m.y.nl

LICENSE

Licensed under GPLv3

DESCRIPTION

Class for decoding binary class-encoded data back to plain-text

Function Documentation

unsigned int bytestoint ( std::istream *  IN,
const unsigned char  version = 2 
)
unsigned int bytestoint ( const unsigned char *  a,
unsigned int *  length = NULL 
)
unsigned int bytestoint_v1 ( const unsigned char *  a,
const int  l 
)
unsigned char getdataversion ( std::istream *  IN)
int readline ( std::istream *  IN,
unsigned char *  buffer,
const int   
)