1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef ENGINE_SHARED_COMPRESSION_H
4#define ENGINE_SHARED_COMPRESSION_H
5
6// variable int packing
7class CVariableInt
8{
9public:
10 enum
11 {
12 MAX_BYTES_PACKED = 5, // maximum number of bytes in a packed int
13 };
14
15 static unsigned char *Pack(unsigned char *pDst, int i, int DstSize);
16 static const unsigned char *Unpack(const unsigned char *pSrc, int *pInOut, int SrcSize);
17
18 static long Compress(const void *pSrc, int SrcSize, void *pDst, int DstSize);
19 static long Decompress(const void *pSrc, int SrcSize, void *pDst, int DstSize);
20};
21
22#endif
23