57 const size_t out_start = *
out_pos;
75 ret = lzma_vli_encode(
count, &coder->
pos,
87 if (lzma_index_iter_next(
101 case SEQ_UNCOMPRESSED: {
106 ret = lzma_vli_encode(
size, &coder->
pos,
120 if (coder->
pos > 0) {
122 out[(*out_pos)++] = 0x00;
127 coder->
crc32 = lzma_crc32(
out + out_start,
145 }
while (++coder->
pos < 4);
156 coder->
crc32 = lzma_crc32(
out + out_start,
174 lzma_index_iter_init(&coder->
iter,
i);
230 if (out_size - *
out_pos < lzma_index_size(
i))
240 const size_t out_start = *
out_pos;
@ LZMA_INDEX_ITER_BLOCK
Get the next Block.
const lzma_allocator const uint8_t size_t uint8_t size_t * out_pos
const lzma_allocator const uint8_t size_t * in_pos
const lzma_allocator const uint8_t size_t in_size
const lzma_allocator * allocator
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
uint32_t lzma_index_padding_size(const lzma_index *i)
static lzma_ret index_encode(void *coder_ptr, const lzma_allocator *allocator lzma_attribute((__unused__)), const uint8_t *restrict in lzma_attribute((__unused__)), size_t *restrict in_pos lzma_attribute((__unused__)), size_t in_size lzma_attribute((__unused__)), uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action lzma_attribute((__unused__)))
lzma_ret lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_index *i)
static void index_encoder_reset(lzma_index_coder *coder, const lzma_index *i)
static void index_encoder_end(void *coder, const lzma_allocator *allocator)
#define lzma_attribute(attr)
assert(limit<=UINT32_MAX/2)
Custom functions for memory handling.
lzma_index_iter iter
Iterator for the Index being encoded.
lzma_index * index
Target Index.
enum lzma_index_coder::@649 sequence
size_t pos
Position in integers.
const lzma_index * index
Index being encoded.
uint32_t crc32
CRC32 of the List of Records field.
Iterator to get information about Blocks and Streams.
struct lzma_index_iter::@636 block
lzma_vli unpadded_size
Unpadded size of this Block.
lzma_vli uncompressed_size
Uncompressed size of this Stream.
bool supported_actions[LZMA_ACTION_MAX+1]
Indicates which lzma_action values are allowed by next.code.
Hold data and function pointers of the next filter in the chain.
lzma_code_function code
Pointer to function to do the actual coding.
void * coder
Pointer to coder-specific data.
Passing data to and from liblzma.
#define lzma_next_coder_init(func, next, allocator)
#define lzma_next_strm_init(func, strm,...)
void * lzma_alloc(size_t size, const lzma_allocator *allocator) lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
Allocates memory.
uint64_t lzma_vli
Variable-length integer type.
lzma_ret
Return values used by several functions in liblzma.
@ LZMA_PROG_ERROR
Programming error.
@ LZMA_MEM_ERROR
Cannot allocate memory.
@ LZMA_STREAM_END
End of stream was reached.
@ LZMA_BUF_ERROR
No progress is possible.
@ LZMA_OK
Operation completed successfully.
lzma_action
The ‘action’ argument for lzma_code()
@ LZMA_FINISH
Finish the coding operation.
@ LZMA_RUN
Continue coding.
void lzma_free(void *ptr, const lzma_allocator *allocator)
Frees memory.
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, uInt len)