Planeshift
|
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | _xd3_addr_cache |
struct | _xd3_config |
struct | _xd3_desect |
struct | _xd3_dinst |
struct | _xd3_hash_cfg |
struct | _xd3_hinst |
struct | _xd3_iopt_buflist |
struct | _xd3_output |
struct | _xd3_rinst |
struct | _xd3_rlist |
struct | _xd3_sec_cfg |
struct | _xd3_slist |
struct | _xd3_smatcher |
struct | _xd3_source |
struct | _xd3_stream |
struct | _xd3_whole_state |
struct | _xd3_wininfo |
struct | _xd3_winst |
Macros | |
#define | __USE_FILE_OFFSET64 1 /* GLIBC: for 64bit fileops, ... ? */ |
#define | _FILE_OFFSET_BITS 64 |
#define | _LARGEFILE_SOURCE |
#define | DP fprintf |
#define | EXIT_FAILURE 1 |
#define | max(x, y) ((x) < (y) ? (y) : (x)) |
#define | min(x, y) ((x) < (y) ? (x) : (y)) |
#define | PYTHON_MODULE 0 |
#define | Q "ll" |
#define | REGRESSION_TEST 0 |
#define | RINT stderr, |
#define | SIZEOF_USIZE_T 4 |
#define | SIZEOF_XOFF_T 8 |
#define | SWIG_MODULE 0 |
#define | UNALIGNED_OK 0 |
#define | USE_UINT32 |
#define | USE_UINT64 |
#define | XD3_ALLOCSIZE (1U<<14) |
#define | XD3_ASSERT(x) (void)0 |
#define | XD3_BUILD_DEFAULT 1 |
#define | XD3_BUILD_FAST 1 |
#define | XD3_BUILD_FASTER 1 |
#define | XD3_BUILD_FASTEST 1 |
#define | XD3_BUILD_SLOW 1 |
#define | XD3_BUILD_SOFT 1 |
#define | XD3_DEBUG 0 |
#define | XD3_DEFAULT_IOPT_SIZE (1U<<15) |
#define | XD3_DEFAULT_LEVEL 3 |
#define | XD3_DEFAULT_SECONDARY_LEVEL 6 |
#define | XD3_DEFAULT_SPREVSZ (1U<<18) |
#define | XD3_DEFAULT_SRCWINSZ (1U << 26) |
#define | XD3_DEFAULT_WINSIZE (1U << 23) |
#define | XD3_ENCODER 1 |
#define | XD3_HARDMAXWINSIZE (1U<<24) |
#define | XD3_USE_LARGEFILE64 1 |
Typedefs | |
typedef unsigned int | usize_t |
typedef struct _xd3_addr_cache | xd3_addr_cache |
typedef void *( | xd3_alloc_func) (void *opaque, usize_t items, usize_t size) |
typedef struct _xd3_code_table_desc | xd3_code_table_desc |
typedef const xd3_dinst *( | xd3_code_table_func) (void) |
typedef struct _xd3_code_table_sizes | xd3_code_table_sizes |
typedef int( | xd3_comp_table_func) (xd3_stream *stream, const uint8_t **data, usize_t *size) |
typedef struct _xd3_config | xd3_config |
typedef struct _xd3_desect | xd3_desect |
typedef struct _xd3_dinst | xd3_dinst |
typedef void( | xd3_free_func) (void *opaque, void *address) |
typedef int( | xd3_getblk_func) (xd3_stream *stream, xd3_source *source, xoff_t blkno) |
typedef struct _xd3_hash_cfg | xd3_hash_cfg |
typedef struct _xd3_hinst | xd3_hinst |
typedef struct _xd3_iopt_buflist | xd3_iopt_buflist |
typedef struct _xd3_output | xd3_output |
typedef struct _xd3_rinst | xd3_rinst |
typedef struct _xd3_rlist | xd3_rlist |
typedef struct _xd3_rpage | xd3_rpage |
typedef struct _xd3_sec_cfg | xd3_sec_cfg |
typedef struct _xd3_sec_stream | xd3_sec_stream |
typedef struct _xd3_sec_type | xd3_sec_type |
typedef struct _xd3_slist | xd3_slist |
typedef struct _xd3_smatcher | xd3_smatcher |
typedef struct _xd3_source | xd3_source |
typedef struct _xd3_stream | xd3_stream |
typedef struct _xd3_whole_state | xd3_whole_state |
typedef struct _xd3_wininfo | xd3_wininfo |
typedef struct _xd3_winst | xd3_winst |
typedef uint64_t | xoff_t |
Functions | |
void | xd3_abort_stream (xd3_stream *stream) |
static void | xd3_avail_input (xd3_stream *stream, const uint8_t *idata, usize_t isize) |
static void | xd3_blksize_add (xoff_t *blkno, usize_t *blkoff, const xd3_source *source, const usize_t add) |
static void | xd3_blksize_div (const xoff_t offset, const xd3_source *source, xoff_t *blkno, usize_t *blkoff) |
int | xd3_close_stream (xd3_stream *stream) |
int | xd3_config_stream (xd3_stream *stream, xd3_config *config) |
static void | xd3_consume_output (xd3_stream *stream) |
int | xd3_decode_input (xd3_stream *stream) |
int | xd3_decode_memory (const uint8_t *input, usize_t input_size, const uint8_t *source, usize_t source_size, uint8_t *output_buf, usize_t *output_size, usize_t avail_output, int flags) |
int | xd3_decode_stream (xd3_stream *stream, const uint8_t *input, usize_t input_size, uint8_t *output, usize_t *output_size, usize_t avail_size) |
int | xd3_encode_init_partial (xd3_stream *stream) |
int | xd3_encode_input (xd3_stream *stream) |
int | xd3_encode_memory (const uint8_t *input, usize_t input_size, const uint8_t *source, usize_t source_size, uint8_t *output_buffer, usize_t *output_size, usize_t avail_output, int flags) |
int | xd3_encode_stream (xd3_stream *stream, const uint8_t *input, usize_t input_size, uint8_t *output, usize_t *output_size, usize_t avail_output) |
static xoff_t | xd3_encoder_srcbase (xd3_stream *stream) |
static usize_t | xd3_encoder_srclen (xd3_stream *stream) |
static int | xd3_encoder_used_source (xd3_stream *stream) |
static const char * | xd3_errstring (xd3_stream *stream) |
int | xd3_found_match (xd3_stream *stream, usize_t pos, usize_t size, xoff_t addr, int is_source) |
void | xd3_free_stream (xd3_stream *stream) |
int | xd3_get_appheader (xd3_stream *stream, uint8_t **data, usize_t *size) |
void | xd3_init_cache (xd3_addr_cache *acache) |
static void | xd3_init_config (xd3_config *config, int flags) |
void | xd3_set_appheader (xd3_stream *stream, const uint8_t *data, usize_t size) |
static void | xd3_set_flags (xd3_stream *stream, int flags) |
int | xd3_set_source (xd3_stream *stream, xd3_source *source) |
int | xd3_set_source_and_size (xd3_stream *stream, xd3_source *source, xoff_t source_size) |
const char * | xd3_strerror (int ret) |
#define __USE_FILE_OFFSET64 1 /* GLIBC: for 64bit fileops, ... ? */ |
#define USE_UINT32 |
#define USE_UINT64 |
typedef struct _xd3_addr_cache xd3_addr_cache |
typedef struct _xd3_code_table_desc xd3_code_table_desc |
typedef struct _xd3_code_table_sizes xd3_code_table_sizes |
typedef int( xd3_comp_table_func) (xd3_stream *stream, const uint8_t **data, usize_t *size) |
typedef struct _xd3_config xd3_config |
typedef struct _xd3_desect xd3_desect |
typedef struct _xd3_dinst xd3_dinst |
typedef void( xd3_free_func) (void *opaque, void *address) |
typedef int( xd3_getblk_func) (xd3_stream *stream, xd3_source *source, xoff_t blkno) |
typedef struct _xd3_hash_cfg xd3_hash_cfg |
typedef struct _xd3_hinst xd3_hinst |
typedef struct _xd3_iopt_buflist xd3_iopt_buflist |
typedef struct _xd3_output xd3_output |
typedef struct _xd3_rinst xd3_rinst |
typedef struct _xd3_rlist xd3_rlist |
typedef struct _xd3_sec_cfg xd3_sec_cfg |
typedef struct _xd3_sec_stream xd3_sec_stream |
typedef struct _xd3_sec_type xd3_sec_type |
typedef struct _xd3_slist xd3_slist |
typedef struct _xd3_smatcher xd3_smatcher |
typedef struct _xd3_source xd3_source |
typedef struct _xd3_stream xd3_stream |
typedef struct _xd3_whole_state xd3_whole_state |
typedef struct _xd3_wininfo xd3_wininfo |
typedef struct _xd3_winst xd3_winst |
enum xd3_decode_state |
enum xd3_encode_state |
enum xd3_flags |
enum xd3_match_state |
enum xd3_rvalues |
enum xd3_smatch_cfg |
void xd3_abort_stream | ( | xd3_stream * | stream | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
int xd3_close_stream | ( | xd3_stream * | stream | ) |
int xd3_config_stream | ( | xd3_stream * | stream, |
xd3_config * | config | ||
) |
|
inlinestatic |
int xd3_decode_input | ( | xd3_stream * | stream | ) |
Definition at line 723 of file xdelta3-decode.h.
int xd3_decode_memory | ( | const uint8_t * | input, |
usize_t | input_size, | ||
const uint8_t * | source, | ||
usize_t | source_size, | ||
uint8_t * | output_buf, | ||
usize_t * | output_size, | ||
usize_t | avail_output, | ||
int | flags | ||
) |
int xd3_decode_stream | ( | xd3_stream * | stream, |
const uint8_t * | input, | ||
usize_t | input_size, | ||
uint8_t * | output, | ||
usize_t * | output_size, | ||
usize_t | avail_size | ||
) |
int xd3_encode_init_partial | ( | xd3_stream * | stream | ) |
int xd3_encode_input | ( | xd3_stream * | stream | ) |
int xd3_encode_memory | ( | const uint8_t * | input, |
usize_t | input_size, | ||
const uint8_t * | source, | ||
usize_t | source_size, | ||
uint8_t * | output_buffer, | ||
usize_t * | output_size, | ||
usize_t | avail_output, | ||
int | flags | ||
) |
int xd3_encode_stream | ( | xd3_stream * | stream, |
const uint8_t * | input, | ||
usize_t | input_size, | ||
uint8_t * | output, | ||
usize_t * | output_size, | ||
usize_t | avail_output | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void xd3_free_stream | ( | xd3_stream * | stream | ) |
int xd3_get_appheader | ( | xd3_stream * | stream, |
uint8_t ** | data, | ||
usize_t * | size | ||
) |
void xd3_init_cache | ( | xd3_addr_cache * | acache | ) |
|
inlinestatic |
void xd3_set_appheader | ( | xd3_stream * | stream, |
const uint8_t * | data, | ||
usize_t | size | ||
) |
|
inlinestatic |
int xd3_set_source | ( | xd3_stream * | stream, |
xd3_source * | source | ||
) |
int xd3_set_source_and_size | ( | xd3_stream * | stream, |
xd3_source * | source, | ||
xoff_t | source_size | ||
) |
const char* xd3_strerror | ( | int | ret | ) |