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 |
Defines |
#define | __USE_FILE_OFFSET64 1 |
#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 |
Enumerations |
enum | xd3_decode_state {
DEC_VCHEAD = 0,
DEC_HDRIND = 1,
DEC_SECONDID = 2,
DEC_TABLEN = 3,
DEC_NEAR = 4,
DEC_SAME = 5,
DEC_TABDAT = 6,
DEC_APPLEN = 7,
DEC_APPDAT = 8,
DEC_WININD = 9,
DEC_CPYLEN = 10,
DEC_CPYOFF = 11,
DEC_ENCLEN = 12,
DEC_TGTLEN = 13,
DEC_DELIND = 14,
DEC_DATALEN = 15,
DEC_INSTLEN = 16,
DEC_ADDRLEN = 17,
DEC_CKSUM = 18,
DEC_DATA = 19,
DEC_INST = 20,
DEC_ADDR = 21,
DEC_EMIT = 22,
DEC_FINISH = 23,
DEC_ABORTED = 24
} |
enum | xd3_encode_state {
ENC_INIT = 0,
ENC_INPUT = 1,
ENC_SEARCH = 2,
ENC_INSTR = 3,
ENC_FLUSH = 4,
ENC_POSTOUT = 5,
ENC_POSTWIN = 6,
ENC_ABORTED = 7
} |
enum | xd3_flags {
XD3_JUST_HDR = (1 << 1),
XD3_SKIP_WINDOW = (1 << 2),
XD3_SKIP_EMIT = (1 << 3),
XD3_FLUSH = (1 << 4),
XD3_SEC_DJW = (1 << 5),
XD3_SEC_FGK = (1 << 6),
XD3_SEC_TYPE = (XD3_SEC_DJW | XD3_SEC_FGK),
XD3_SEC_NODATA = (1 << 7),
XD3_SEC_NOINST = (1 << 8),
XD3_SEC_NOADDR = (1 << 9),
XD3_SEC_NOALL = (XD3_SEC_NODATA | XD3_SEC_NOINST | XD3_SEC_NOADDR),
XD3_ADLER32 = (1 << 10),
XD3_ADLER32_NOVER = (1 << 11),
XD3_ALT_CODE_TABLE = (1 << 12),
XD3_NOCOMPRESS = (1 << 13),
XD3_BEGREEDY = (1 << 14),
XD3_ADLER32_RECODE = (1 << 15),
XD3_COMPLEVEL_SHIFT = 20,
XD3_COMPLEVEL_MASK = (0xF << XD3_COMPLEVEL_SHIFT),
XD3_COMPLEVEL_1 = (1 << XD3_COMPLEVEL_SHIFT),
XD3_COMPLEVEL_2 = (2 << XD3_COMPLEVEL_SHIFT),
XD3_COMPLEVEL_3 = (3 << XD3_COMPLEVEL_SHIFT),
XD3_COMPLEVEL_6 = (6 << XD3_COMPLEVEL_SHIFT),
XD3_COMPLEVEL_9 = (9 << XD3_COMPLEVEL_SHIFT)
} |
enum | xd3_match_state { MATCH_TARGET = 0,
MATCH_BACKWARD = 1,
MATCH_FORWARD = 2,
MATCH_SEARCHING = 3
} |
enum | xd3_rvalues {
XD3_INPUT = -17703,
XD3_OUTPUT = -17704,
XD3_GETSRCBLK = -17705,
XD3_GOTHEADER = -17706,
XD3_WINSTART = -17707,
XD3_WINFINISH = -17708,
XD3_TOOFARBACK = -17709,
XD3_INTERNAL = -17710,
XD3_INVALID = -17711,
XD3_INVALID_INPUT = -17712,
XD3_NOSECOND = -17713,
XD3_UNIMPLEMENTED = -17714
} |
enum | xd3_smatch_cfg {
XD3_SMATCH_DEFAULT = 0,
XD3_SMATCH_SLOW = 1,
XD3_SMATCH_FAST = 2,
XD3_SMATCH_FASTER = 3,
XD3_SMATCH_FASTEST = 4,
XD3_SMATCH_SOFT = 5
} |
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) |