ENet v1.3.17
Reliable UDP networking library
|
An adaptive order-2 PPM range coder. More...
Macros | |
#define | ENET_BUILDING_LIB 1 |
#define | ENET_CONTEXT_CREATE(context, escapes_, minimum) |
#define | ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft) |
#define | ENET_CONTEXT_ENCODE(context, symbol_, value_, under_, count_, update, minimum) |
#define | ENET_CONTEXT_NOT_EXCLUDED(value_, after, before) |
#define | ENET_CONTEXT_RESCALE(context, minimum) |
#define | ENET_CONTEXT_ROOT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) |
#define | ENET_CONTEXT_TRY_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0) |
#define | ENET_RANGE_CODER_DECODE(under, count, total) |
#define | ENET_RANGE_CODER_ENCODE(under, count, total) |
#define | ENET_RANGE_CODER_FLUSH |
#define | ENET_RANGE_CODER_FREE_SYMBOLS |
#define | ENET_RANGE_CODER_OUTPUT(value) |
#define | ENET_RANGE_CODER_READ(total) ((decodeCode - decodeLow) / (decodeRange /= (total))) |
#define | ENET_RANGE_CODER_SEED |
#define | ENET_SYMBOL_CREATE(symbol, value_, count_) |
Enumerations | |
enum | { ENET_RANGE_CODER_TOP = 1<<24 , ENET_RANGE_CODER_BOTTOM = 1<<16 , ENET_CONTEXT_SYMBOL_DELTA = 3 , ENET_CONTEXT_SYMBOL_MINIMUM = 1 , ENET_CONTEXT_ESCAPE_MINIMUM = 1 , ENET_SUBCONTEXT_ORDER = 2 , ENET_SUBCONTEXT_SYMBOL_DELTA = 2 , ENET_SUBCONTEXT_ESCAPE_DELTA = 5 } |
Functions | |
int | enet_host_compress_with_range_coder (ENetHost *host) |
Sets the packet compressor the host should use to the default range coder. More... | |
size_t | enet_range_coder_compress (void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit) |
void * | enet_range_coder_create (void) |
size_t | enet_range_coder_decompress (void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit) |
void | enet_range_coder_destroy (void *context) |
An adaptive order-2 PPM range coder.
#define ENET_BUILDING_LIB 1 |
#define ENET_CONTEXT_CREATE | ( | context, | |
escapes_, | |||
minimum | |||
) |
#define ENET_CONTEXT_DECODE | ( | context, | |
symbol_, | |||
code, | |||
value_, | |||
under_, | |||
count_, | |||
update, | |||
minimum, | |||
createRoot, | |||
visitNode, | |||
createRight, | |||
createLeft | |||
) |
#define ENET_CONTEXT_ENCODE | ( | context, | |
symbol_, | |||
value_, | |||
under_, | |||
count_, | |||
update, | |||
minimum | |||
) |
#define ENET_CONTEXT_NOT_EXCLUDED | ( | value_, | |
after, | |||
before | |||
) |
#define ENET_CONTEXT_RESCALE | ( | context, | |
minimum | |||
) |
#define ENET_CONTEXT_ROOT_DECODE | ( | context, | |
symbol_, | |||
code, | |||
value_, | |||
under_, | |||
count_, | |||
update, | |||
minimum, | |||
exclude | |||
) |
#define ENET_CONTEXT_TRY_DECODE | ( | context, | |
symbol_, | |||
code, | |||
value_, | |||
under_, | |||
count_, | |||
update, | |||
minimum, | |||
exclude | |||
) | ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0) |
#define ENET_RANGE_CODER_DECODE | ( | under, | |
count, | |||
total | |||
) |
#define ENET_RANGE_CODER_ENCODE | ( | under, | |
count, | |||
total | |||
) |
#define ENET_RANGE_CODER_FLUSH |
#define ENET_RANGE_CODER_FREE_SYMBOLS |
#define ENET_RANGE_CODER_OUTPUT | ( | value | ) |
#define ENET_RANGE_CODER_READ | ( | total | ) | ((decodeCode - decodeLow) / (decodeRange /= (total))) |
#define ENET_RANGE_CODER_SEED |
#define ENET_SYMBOL_CREATE | ( | symbol, | |
value_, | |||
count_ | |||
) |
anonymous enum |
size_t enet_range_coder_compress | ( | void * | context, |
const ENetBuffer * | inBuffers, | ||
size_t | inBufferCount, | ||
size_t | inLimit, | ||
enet_uint8 * | outData, | ||
size_t | outLimit | ||
) |
void * enet_range_coder_create | ( | void | ) |
size_t enet_range_coder_decompress | ( | void * | context, |
const enet_uint8 * | inData, | ||
size_t | inLimit, | ||
enet_uint8 * | outData, | ||
size_t | outLimit | ||
) |
void enet_range_coder_destroy | ( | void * | context | ) |