DDraceNetwork Docs
compression.h
Go to the documentation of this file.
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
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
Definition: compression.h:8
@ MAX_BYTES_PACKED
Definition: compression.h:12
static long Compress(const void *pSrc, int SrcSize, void *pDst, int DstSize)
Definition: compression.cpp:88
static unsigned char * Pack(unsigned char *pDst, int i, int DstSize)
Definition: compression.cpp:10
static const unsigned char * Unpack(const unsigned char *pSrc, int *pInOut, int SrcSize)
Definition: compression.cpp:40
static long Decompress(const void *pSrc, int SrcSize, void *pDst, int DstSize)
Definition: compression.cpp:68