XZ Utils  5.4.0
Public Types | Data Fields
lzma_stream_coder_s Struct Reference

Public Types

enum  { SEQ_STREAM_HEADER , SEQ_BLOCK , SEQ_INDEX , SEQ_STREAM_FOOTER }
 

Data Fields

enum lzma_stream_coder_s:: { ... }  sequence
 
size_t block_size
 
lzma_filter filters [LZMA_FILTERS_MAX+1]
 
lzma_filter filters_cache [LZMA_FILTERS_MAX+1]
 
lzma_indexindex
 Index to hold sizes of the Blocks. More...
 
lzma_next_coder index_encoder
 Index encoder. More...
 
lzma_stream_flags stream_flags
 Stream Flags for encoding the Stream Header and Stream Footer. More...
 
uint8_t header [LZMA_STREAM_HEADER_SIZE]
 Buffer to hold Stream Header and Stream Footer. More...
 
size_t header_pos
 Read position in header[]. More...
 
lzma_outq outq
 Output buffer queue for compressed data. More...
 
size_t outbuf_alloc_size
 How much memory to allocate for each lzma_outbuf.buf. More...
 
uint32_t timeout
 
lzma_ret thread_error
 Error code from a worker thread. More...
 
worker_threadthreads
 Array of allocated thread-specific structures. More...
 
uint32_t threads_max
 
uint32_t threads_initialized
 
worker_threadthreads_free
 
worker_threadthr
 
uint64_t progress_in
 
uint64_t progress_out
 
mythread_mutex mutex
 
mythread_cond cond
 

Field Documentation

◆ block_size

size_t lzma_stream_coder_s::block_size

Start a new Block every block_size bytes of input unless LZMA_FULL_FLUSH or LZMA_FULL_BARRIER is used earlier.

◆ filters

lzma_filter lzma_stream_coder_s::filters[LZMA_FILTERS_MAX+1]

The filter chain to use for the next Block. This can be updated using lzma_filters_update() after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.

◆ filters_cache

lzma_filter lzma_stream_coder_s::filters_cache[LZMA_FILTERS_MAX+1]

A copy of filters[] will be put here when attempting to get a new worker thread. This will be copied to a worker thread when a thread becomes free and then this cache is marked as empty by setting [0].id = LZMA_VLI_UNKNOWN. Without this cache the filter options from filters[] would get uselessly copied multiple times (allocated and freed) when waiting for a new free worker thread.

This is freed if filters[] is updated via lzma_filters_update().

◆ index

lzma_index* lzma_stream_coder_s::index

Index to hold sizes of the Blocks.

◆ index_encoder

lzma_next_coder lzma_stream_coder_s::index_encoder

Index encoder.

◆ stream_flags

lzma_stream_flags lzma_stream_coder_s::stream_flags

Stream Flags for encoding the Stream Header and Stream Footer.

◆ header

uint8_t lzma_stream_coder_s::header[LZMA_STREAM_HEADER_SIZE]

Buffer to hold Stream Header and Stream Footer.

◆ header_pos

size_t lzma_stream_coder_s::header_pos

Read position in header[].

◆ outq

lzma_outq lzma_stream_coder_s::outq

Output buffer queue for compressed data.

◆ outbuf_alloc_size

size_t lzma_stream_coder_s::outbuf_alloc_size

How much memory to allocate for each lzma_outbuf.buf.

◆ timeout

uint32_t lzma_stream_coder_s::timeout

Maximum wait time if cannot use all the input and cannot fill the output buffer. This is in milliseconds.

◆ thread_error

lzma_ret lzma_stream_coder_s::thread_error

Error code from a worker thread.

◆ threads

worker_thread* lzma_stream_coder_s::threads

Array of allocated thread-specific structures.

◆ threads_max

uint32_t lzma_stream_coder_s::threads_max

Number of structures in "threads" above. This is also the number of threads that will be created at maximum.

◆ threads_initialized

uint32_t lzma_stream_coder_s::threads_initialized

Number of thread structures that have been initialized, and thus the number of worker threads actually created so far.

◆ threads_free

worker_thread* lzma_stream_coder_s::threads_free

Stack of free threads. When a thread finishes, it puts itself back into this stack. This starts as empty because threads are created only when actually needed.

◆ thr

worker_thread* lzma_stream_coder_s::thr

The most recent worker thread to which the main thread writes the new input from the application.

◆ progress_in

uint64_t lzma_stream_coder_s::progress_in

Amount of uncompressed data in Blocks that have already been finished.

◆ progress_out

uint64_t lzma_stream_coder_s::progress_out

Amount of compressed data in Stream Header + Blocks that have already been finished.


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