mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-28 03:25:27 +01:00
02da650191
- added snes_gx 4.3.4
33 lines
580 B
C++
33 lines
580 B
C++
#ifndef _RAR_RS_
|
|
#define _RAR_RS_
|
|
|
|
#define MAXPAR 255
|
|
#define MAXPOL 512
|
|
|
|
class RSCoder
|
|
{
|
|
private:
|
|
void gfInit();
|
|
int gfMult(int a,int b);
|
|
void pnInit();
|
|
void pnMult(int *p1,int *p2,int *r);
|
|
|
|
int gfExp[MAXPOL];
|
|
int gfLog[MAXPAR+1];
|
|
|
|
int GXPol[MAXPOL*2];
|
|
|
|
int ErrorLocs[MAXPAR+1],ErrCount;
|
|
int Dn[MAXPAR+1];
|
|
|
|
int ParSize;
|
|
int PolB[MAXPOL];
|
|
bool FirstBlockDone;
|
|
public:
|
|
RSCoder(int ParSize);
|
|
void Encode(byte *Data,int DataSize,byte *DestData);
|
|
bool Decode(byte *Data,int DataSize,int *EraLoc,int EraSize);
|
|
};
|
|
|
|
#endif
|