#define ENET_BUILDING_LIB …
#include <string.h>
#include "enet/enet.h"
ENetSymbol;
enum
{ … };
#undef ENET_CONTEXT_EXCLUSION
ENetRangeCoder;
void *
enet_range_coder_create (void)
{ … }
void
enet_range_coder_destroy (void * context)
{ … }
#define ENET_SYMBOL_CREATE(symbol, value_, count_) …
#define ENET_CONTEXT_CREATE(context, escapes_, minimum) …
static enet_uint16
enet_symbol_rescale (ENetSymbol * symbol)
{ … }
#define ENET_CONTEXT_RESCALE(context, minimum) …
#define ENET_RANGE_CODER_OUTPUT(value) …
#define ENET_RANGE_CODER_ENCODE(under, count, total) …
#define ENET_RANGE_CODER_FLUSH …
#define ENET_RANGE_CODER_FREE_SYMBOLS …
#define ENET_CONTEXT_ENCODE(context, symbol_, value_, under_, count_, update, minimum) …
#ifdef ENET_CONTEXT_EXCLUSION
static const ENetSymbol emptyContext = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
#define ENET_CONTEXT_WALK …
#define ENET_CONTEXT_ENCODE_EXCLUDE …
#endif
size_t
enet_range_coder_compress (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit)
{ … }
#define ENET_RANGE_CODER_SEED …
#define ENET_RANGE_CODER_READ(total) …
#define ENET_RANGE_CODER_DECODE(under, count, total) …
#define ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft) …
#define ENET_CONTEXT_TRY_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) …
#define ENET_CONTEXT_ROOT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) … \
#ifdef ENET_CONTEXT_EXCLUSION
typedef struct _ENetExclude
{
enet_uint8 value;
enet_uint16 under;
} ENetExclude;
#define ENET_CONTEXT_DECODE_EXCLUDE …
#define ENET_CONTEXT_EXCLUDED …
#endif
#define ENET_CONTEXT_NOT_EXCLUDED(value_, after, before) …
size_t
enet_range_coder_decompress (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit)
{ … }
int
enet_host_compress_with_range_coder (ENetHost * host)
{ … }