17 #define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
30 static const bool MASK_TO_ALLOWED_STATUS[8]
31 = {
true,
true,
true,
false,
true,
false,
false,
false };
33 static const uint32_t MASK_TO_BIT_NUMBER[8]
34 = { 0, 1, 2, 2, 3, 3, 3, 3 };
43 if (now_pos - prev_pos > 5)
44 prev_pos = now_pos - 5;
47 size_t buffer_pos = 0;
49 while (buffer_pos <=
limit) {
51 if (
b != 0xE8 &&
b != 0xE9) {
58 prev_pos = now_pos + (
uint32_t)(buffer_pos);
72 && MASK_TO_ALLOWED_STATUS[(prev_mask >> 1) & 0x7]
73 && (prev_mask >> 1) < 0x10) {
78 | (
buffer[buffer_pos + 1]);
100 src =
dest ^ ((1U << (32 -
i * 8)) - 1);
const lzma_allocator * allocator
const lzma_filter * filters
static uint32_t const uint8_t uint32_t uint32_t limit
lzma_ret lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, size_t(*filter)(void *simple, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size), size_t simple_size, size_t unfiltered_max, uint32_t alignment, bool is_encoder)
Private definitions for so called simple filters.
Custom functions for memory handling.
Hold data and function pointers of the next filter in the chain.
void * coder
Pointer to coder-specific data.
static lzma_ret x86_coder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters, bool is_encoder)
lzma_ret lzma_simple_x86_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
lzma_ret lzma_simple_x86_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
static size_t x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size)
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_OK
Operation completed successfully.