xref: /haiku/src/add-ons/media/plugins/ape_reader/MAClib/Predictor.h (revision be878f60874196f746f336f235797c8efa25004e)
1*b51fbe43SDavid McPaul #ifndef APE_PREDICTOR_H
2*b51fbe43SDavid McPaul #define APE_PREDICTOR_H
3*b51fbe43SDavid McPaul 
4*b51fbe43SDavid McPaul /*************************************************************************************************
5*b51fbe43SDavid McPaul IPredictorCompress - the interface for compressing (predicting) data
6*b51fbe43SDavid McPaul *************************************************************************************************/
7*b51fbe43SDavid McPaul class IPredictorCompress
8*b51fbe43SDavid McPaul {
9*b51fbe43SDavid McPaul public:
IPredictorCompress(int nCompressionLevel)10*b51fbe43SDavid McPaul     IPredictorCompress(int nCompressionLevel) {}
~IPredictorCompress()11*b51fbe43SDavid McPaul     virtual ~IPredictorCompress() {}
12*b51fbe43SDavid McPaul 
13*b51fbe43SDavid McPaul     virtual int CompressValue(int nA, int nB = 0) = 0;
14*b51fbe43SDavid McPaul     virtual int Flush() = 0;
15*b51fbe43SDavid McPaul };
16*b51fbe43SDavid McPaul 
17*b51fbe43SDavid McPaul /*************************************************************************************************
18*b51fbe43SDavid McPaul IPredictorDecompress - the interface for decompressing (un-predicting) data
19*b51fbe43SDavid McPaul *************************************************************************************************/
20*b51fbe43SDavid McPaul class IPredictorDecompress
21*b51fbe43SDavid McPaul {
22*b51fbe43SDavid McPaul public:
IPredictorDecompress(int nCompressionLevel,int nVersion)23*b51fbe43SDavid McPaul     IPredictorDecompress(int nCompressionLevel, int nVersion) {}
~IPredictorDecompress()24*b51fbe43SDavid McPaul     virtual ~IPredictorDecompress() {}
25*b51fbe43SDavid McPaul 
26*b51fbe43SDavid McPaul     virtual int DecompressValue(int nA, int nB = 0) = 0;
27*b51fbe43SDavid McPaul     virtual int Flush() = 0;
28*b51fbe43SDavid McPaul };
29*b51fbe43SDavid McPaul 
30*b51fbe43SDavid McPaul #endif // #ifndef APE_PREDICTOR_H
31