Definition in file dernc.h.
Go to the source code of this file.
Defines | |
| #define | RNC_FILE_IS_NOT_RNC -1 |
| #define | RNC_HUF_DECODE_ERROR -2 |
| #define | RNC_FILE_SIZE_MISMATCH -3 |
| #define | RNC_PACKED_CRC_ERROR -4 |
| #define | RNC_UNPACKED_CRC_ERROR -5 |
| #define | RNC_HEADER_VAL_ERROR -6 |
| #define | RNC_HUF_EXCEEDS_RANGE -7 |
| #define | RNC_MAX_FILESIZE 1<<30 |
| Limit of the compressed & decompressed file sizes. | |
| #define | SIZEOF_RNC_HEADER 18 |
| Length of the RNC file header, in bytes. | |
Typedefs | |
| typedef long(* | rnc_callback )(long done, long total) |
Enumerations | |
| enum | EXTRA_OBJ_LOAD { RNC_IGNORE_NONE = 0x0000, RNC_IGNORE_FILE_IS_NOT_RNC = 0x0001, RNC_IGNORE_HUF_DECODE_ERROR = 0x0002, RNC_IGNORE_FILE_SIZE_MISMATCH = 0x0004, RNC_IGNORE_PACKED_CRC_ERROR = 0x0008, RNC_IGNORE_UNPACKED_CRC_ERROR = 0x0010, RNC_IGNORE_HEADER_VAL_ERROR = 0x0020, RNC_IGNORE_HUF_EXCEEDS_RANGE = 0x0040, EXLD_THING = 0x01, EXLD_ACTNPT = 0x02, EXLD_STLGHT = 0x04 } |
| Flags to ignore errors. More... | |
Functions | |
| long | rnc_plen (void *packed) |
| Return the compressed length of a packed data block. | |
| long | rnc_ulen (void *packed) |
| Return the uncompressed length of a packed data block. | |
| long | rnc_unpack (const void *packed, void *unpacked, const unsigned int flags) |
| Decompress a packed data block. | |
| long | rnc_nocallback (long done, long total) |
| Empty callback - for use if no callback is needed. | |
| long | rnc_printcallback (long done, long total) |
| Console print callback - for use in console tools. | |
| char * | rnc_error (long errcode) |
| Returns an error string corresponding to an error code. | |
| long | rnc_crc (const void *data, unsigned long len) |
| Calculate a CRC, the RNC way. | |
| #define RNC_FILE_IS_NOT_RNC -1 |
| #define RNC_FILE_SIZE_MISMATCH -3 |
| #define RNC_HEADER_VAL_ERROR -6 |
| #define RNC_HUF_DECODE_ERROR -2 |
| #define RNC_HUF_EXCEEDS_RANGE -7 |
| #define RNC_MAX_FILESIZE 1<<30 |
Limit of the compressed & decompressed file sizes.
Definition at line 76 of file dernc.h.
Referenced by rnc_unpack().
| #define RNC_PACKED_CRC_ERROR -4 |
| #define RNC_UNPACKED_CRC_ERROR -5 |
| #define SIZEOF_RNC_HEADER 18 |
Length of the RNC file header, in bytes.
Definition at line 81 of file dernc.h.
Referenced by memfile_read(), and rnc_unpack().
| typedef long(* rnc_callback)(long done, long total) |
| enum EXTRA_OBJ_LOAD |
| long rnc_crc | ( | const void * | data, | |
| unsigned long | len | |||
| ) |
Calculate a CRC, the RNC way.
| data | The data buffer. | |
| len | data Length of the data buffer. |
Definition at line 715 of file dernc.c.
Referenced by rnc_unpack().
| char* rnc_error | ( | long | errcode | ) |
Returns an error string corresponding to an error code.
| errcode | Error code returned by a function. |
Definition at line 272 of file dernc.c.
Referenced by memfile_error().
| long rnc_nocallback | ( | long | done, | |
| long | total | |||
| ) |
| long rnc_plen | ( | void * | packed | ) |
Return the compressed length of a packed data block.
The packed buffer must be longer than SIZEOF_RNC_HEADER.
| packed | Packed buffer. |
Definition at line 316 of file dernc.c.
Referenced by memfile_read().
| long rnc_printcallback | ( | long | done, | |
| long | total | |||
| ) |
| long rnc_ulen | ( | void * | packed | ) |
Return the uncompressed length of a packed data block.
The packed buffer must be longer than SIZEOF_RNC_HEADER.
| packed | Packed buffer. |
Definition at line 301 of file dernc.c.
Referenced by memfile_read().
| long rnc_unpack | ( | const void * | packed, | |
| void * | unpacked, | |||
| const unsigned int | flags | |||
| ) |
Decompress a packed data block.
| packed | Packed source data buffer. | |
| unpacked | Unpacked destination data buffer. | |
| flags | Option flags for the decompressor. |
Definition at line 351 of file dernc.c.
Referenced by memfile_read().
1.5.6