Rizin
unix-like reverse engineering framework and cli tools
lzma_simple_coder Struct Reference

#include <simple_private.h>

Public Attributes

lzma_next_coder next
 Next filter in the chain. More...
 
bool end_was_reached
 True if the next coder in the chain has returned LZMA_STREAM_END. More...
 
bool is_encoder
 
size_t(* filter )(void *simple, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size)
 
void * simple
 
uint32_t now_pos
 
size_t allocated
 Size of the memory allocated for the buffer. More...
 
size_t pos
 
size_t filtered
 
size_t size
 
uint8_t buffer []
 Temporary buffer. More...
 

Detailed Description

Definition at line 19 of file simple_private.h.

Member Data Documentation

◆ allocated

size_t lzma_simple_coder::allocated

Size of the memory allocated for the buffer.

Definition at line 47 of file simple_private.h.

Referenced by lzma_simple_coder_init(), and simple_code().

◆ buffer

uint8_t lzma_simple_coder::buffer[]

Temporary buffer.

Definition at line 62 of file simple_private.h.

Referenced by simple_code().

◆ end_was_reached

bool lzma_simple_coder::end_was_reached

True if the next coder in the chain has returned LZMA_STREAM_END.

Definition at line 24 of file simple_private.h.

Referenced by copy_or_code(), lzma_simple_coder_init(), and simple_code().

◆ filter

size_t(* lzma_simple_coder::filter) (void *simple, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size)

Pointer to filter-specific function, which does the actual filtering.

Definition at line 34 of file simple_private.h.

Referenced by call_filter(), and lzma_simple_coder_init().

◆ filtered

size_t lzma_simple_coder::filtered

buffer[filtered] is the first unfiltered byte. When pos is smaller than filtered, there is unflushed filtered data in the buffer.

Definition at line 55 of file simple_private.h.

Referenced by lzma_simple_coder_init(), and simple_code().

◆ is_encoder

bool lzma_simple_coder::is_encoder

True if filter() should encode the data; false to decode. Currently all simple filters use the same function for encoding and decoding, because the difference between encoders and decoders is very small.

Definition at line 30 of file simple_private.h.

Referenced by call_filter(), copy_or_code(), and lzma_simple_coder_init().

◆ next

lzma_next_coder lzma_simple_coder::next

Next filter in the chain.

Definition at line 21 of file simple_private.h.

Referenced by copy_or_code(), lzma_simple_coder_init(), simple_coder_end(), and simple_coder_update().

◆ now_pos

uint32_t lzma_simple_coder::now_pos

The lowest 32 bits of the current position in the data. Most filters need this to do conversions between absolute and relative addresses.

Definition at line 44 of file simple_private.h.

Referenced by call_filter(), and lzma_simple_coder_init().

◆ pos

size_t lzma_simple_coder::pos

Flushing position in the temporary buffer. buffer[pos] is the next byte to be copied to out[].

Definition at line 51 of file simple_private.h.

Referenced by cmd_descs_generate.CmdDesc::_validate(), lzma_simple_coder_init(), and simple_code().

◆ simple

void* lzma_simple_coder::simple

Pointer to filter-specific data, or NULL if filter doesn't need any extra data.

Definition at line 39 of file simple_private.h.

Referenced by call_filter(), lzma_simple_coder_init(), simple_coder_end(), and x86_coder_init().

◆ size

size_t lzma_simple_coder::size

Total number of bytes (both filtered and unfiltered) currently in the temporary buffer.

Definition at line 59 of file simple_private.h.

Referenced by lzma_simple_coder_init(), and simple_code().


The documentation for this struct was generated from the following file: