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