22 #define memcrap(buf, size) memset(buf, 0xFD, size)
24 #define expect(test) ((test) ? 0 : (fprintf(stderr, "%s:%d: %s\n", \
25 __FILE__, __LINE__, #test), abort(), 0))
27 #define succeed(test) expect(!(test))
29 #define fail(test) expect(test)
32 static inline const char *
36 return "UNKNOWN_ERROR";
38 static const char *msgs[] = {
42 "LZMA_UNSUPPORTED_CHECK",
45 "LZMA_MEMLIMIT_ERROR",
63 size_t out_left = out_size > 0 ? out_size + 1 : 0;
94 if (ret != expected_ret)
const lzma_allocator const uint8_t size_t in_size
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
The public API of liblzma data compression library.
Passing data to and from liblzma.
Common includes, definitions, system-specific things etc.
static bool coder_loop(lzma_stream *strm, uint8_t *in, size_t in_size, uint8_t *out, size_t out_size, lzma_ret expected_ret, lzma_action finishing_action)
static bool decoder_loop_ret(lzma_stream *strm, uint8_t *in, size_t in_size, lzma_ret expected_ret)
static const char * lzma_ret_sym(lzma_ret ret)
static bool decoder_loop(lzma_stream *strm, uint8_t *in, size_t in_size)
Various integer and bit operations.
void error(const char *msg)
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_PROG_ERROR
Programming error.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_RUN
Continue coding.