XZ Utils  5.2.4
Macros | Functions
mythread.h File Reference

Some threading related helper macros and functions. More...

#include "sysdefs.h"
#include <signal.h>

Macros

#define mythread_once(func)
 

Functions

static void mythread_sigmask (int how, const sigset_t *restrict set, sigset_t *restrict oset)
 

Detailed Description

Some threading related helper macros and functions.

Macro Definition Documentation

◆ mythread_once

#define mythread_once (   func)
Value:
do { \
static bool once_ = false; \
if (!once_) { \
func(); \
once_ = true; \
} \
} while (0)
lzma_block_header_decode
lzma_ret lzma_block_header_decode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
Decode Block Header.
Definition: block_header_decoder.c:34
file_pair::dest_name
char * dest_name
Definition: file_io.h:38
lzma_block_decoder
lzma_ret lzma_block_decoder(lzma_stream *strm, lzma_block *block)
Initialize .xz Block decoder.
Definition: block_decoder.c:249
lzma_alone_coder
Definition: alone_decoder.c:18
lzma_easy_decoder_memusage
uint64_t lzma_easy_decoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure
Calculate approximate decoder memory usage of a preset.
Definition: easy_decoder_memusage.c:17
lzma_index_hash_info::uncompressed_size
lzma_vli uncompressed_size
Sum of the Uncompressed Size fields.
Definition: index_hash.c:23
index_tree_node_s::uncompressed_base
lzma_vli uncompressed_base
Definition: index.c:34
lzma_crc64
uint64_t lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc) lzma_nothrow lzma_attr_pure
Calculate CRC64.
Definition: crc64_fast.c:30
lzma_crc32
uint32_t lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
Calculate CRC32.
Definition: crc32_small.c:49
lzma_options_lzma::nice_len
uint32_t nice_len
Nice length of a match.
Definition: lzma12.h:342
lzma_alone_coder::pos
size_t pos
Position in the header fields.
Definition: alone_decoder.c:35
update_match
#define update_match(state)
Indicate that the latest state was a match.
Definition: lzma_common.h:88
lzma_index_coder::unpadded_size
lzma_vli unpadded_size
The most recent Unpadded Size field.
Definition: index_decoder.c:43
opt_auto_adjust
bool opt_auto_adjust
Definition: coder.c:26
files_total
static unsigned int files_total
Total number of input files; zero if unknown.
Definition: message.c:22
lzma_options_lzma
Options specific to the LZMA1 and LZMA2 filters.
Definition: lzma12.h:185
lzma_outq_get_buf
lzma_outbuf * lzma_outq_get_buf(lzma_outq *outq)
Get a new buffer.
Definition: outqueue.c:114
block.h
.xz Block handling
lzma_dict::buf
uint8_t * buf
Definition: lz_decoder.h:24
lzma_index_iter_locate
lzma_bool lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
Locate a Block.
Definition: index.c:1210
lzma_delta_coder
Definition: delta_private.h:18
lzma_index_memused
uint64_t lzma_index_memused(const lzma_index *i) lzma_nothrow
Calculate the memory usage of an existing lzma_index.
Definition: index.c:491
message_filename
void message_filename(const char *src_name)
Set the name of the current file and possibly print it too.
Definition: message.c:227
LZMA_BUFFER_SIZE
#define LZMA_BUFFER_SIZE
Size of temporary buffers needed in some filters.
Definition: common.h:49
lzma_stream_coder_s::threads_max
uint32_t threads_max
Definition: stream_encoder_mt.c:150
parse_options
static void parse_options(const char *str, const option_map *opts, void(*set)(void *filter_options, unsigned key, uint64_t value, const char *valuestr), void *filter_options)
Definition: options.c:60
lzma_mt::check
lzma_check check
Integrity check type.
Definition: container.h:160
lzma_filters_update
lzma_ret lzma_filters_update(lzma_stream *strm, const lzma_filter *filters) lzma_nothrow
Update the filter chain in the encoder.
Definition: filter_encoder.c:172
lzma_block::compressed_size
lzma_vli compressed_size
Size of the Compressed Data in bytes.
Definition: block.h:148
lzma_mf_s::sons_count
uint32_t sons_count
Number of elements in son[].
Definition: lz_encoder.h:125
lzma_stream_coder::tell_no_check
bool tell_no_check
Definition: stream_decoder.c:51
hardware_memlimit_set
void hardware_memlimit_set(uint64_t new_memlimit, bool set_compress, bool set_decompress, bool is_percentage)
Definition: hardware.c:62
lzmainfo
static bool lzmainfo(const char *name, FILE *f)
Parse the .lzma header and display information about it.
Definition: lzmainfo.c:101
lzma_mode
lzma_mode
Compression modes.
Definition: lzma12.h:138
lzma_index_hash_size
lzma_vli lzma_index_hash_size(const lzma_index_hash *index_hash) lzma_nothrow lzma_attr_pure
Get the size of the Index field as bytes.
Definition: index_hash.c:114
index_tree_node_end
static void index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator, void(*free_func)(void *node, const lzma_allocator *allocator))
Helper for index_tree_end()
Definition: index.c:194
fastpos.h
Kind of two-bit version of bit scan reverse.
range_common.h
Common things for range encoder and decoder.
lzma_index_iter::number_in_stream
lzma_vli number_in_stream
Block number in this Stream.
Definition: index.h:154
rc_update_0
#define rc_update_0(prob)
Definition: range_decoder.h:119
list_totals
void list_totals(void)
Show the totals after all files have been listed.
Definition: list.c:1121
delta_common.h
Common stuff for Delta encoder and decoder.
xmalloc
#define xmalloc(size)
Safe malloc() that never returns NULL.
Definition: util.h:18
lzma_stream_encoder_mt_memusage
uint64_t lzma_stream_encoder_mt_memusage(const lzma_mt *options)
Calculate approximate memory usage of multithreaded .xz encoder.
Definition: stream_encoder_mt.c:1097
lzma_lz_options::depth
uint32_t depth
Maximum search depth.
Definition: lz_encoder.h:154
lzma_lz_options::dict_size
size_t dict_size
Size of the history buffer.
Definition: lz_decoder.h:48
lzma_allocator::alloc
void *(* alloc)(void *opaque, size_t nmemb, size_t size)
Pointer to a custom memory allocation function.
Definition: base.h:407
coder_set_extreme
void coder_set_extreme(void)
Enable extreme mode.
Definition: coder.c:98
parse_check_value
static bool parse_check_value(file_pair *pair, const lzma_index_iter *iter)
Parse the Check field and put it into check_value[].
Definition: list.c:546
filter.h
Common filter related types and functions.
block_header_info::flags
char flags[3]
A few of the Block Flags as a string.
Definition: list.c:46
split_block
static void split_block(uint64_t *block_remaining, uint64_t *next_block_remaining, size_t *list_pos)
Definition: coder.c:571
index_size_unpadded
static lzma_vli index_size_unpadded(lzma_vli count, lzma_vli index_list_size)
Calculate the size of the Index field excluding Index Padding.
Definition: index.h:48
lzma_mf_s::nice_len
uint32_t nice_len
Maximum length of a match that the match finder will try to find.
Definition: lz_encoder.h:109
lzma_index_hash_size
lzma_vli lzma_index_hash_size(const lzma_index_hash *index_hash)
Get the size of the Index field as bytes.
Definition: index_hash.c:114
lzma_outq_memusage
uint64_t lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads)
Calculate the memory usage of an output queue.
Definition: outqueue.c:42
LZMA_PROG_ERROR
@ LZMA_PROG_ERROR
Programming error.
Definition: base.h:218
lzma_mf_s::read_limit
uint32_t read_limit
Definition: lz_encoder.h:75
lz_encoder.h
LZ in window and match finder API.
LZMA_INDEX_ITER_NONEMPTY_BLOCK
@ LZMA_INDEX_ITER_NONEMPTY_BLOCK
Get the next non-empty Block.
Definition: index.h:260
lzma_raw_encoder_memusage
uint64_t lzma_raw_encoder_memusage(const lzma_filter *filters)
Calculate approximate memory requirements for raw encoder.
Definition: filter_encoder.c:222
lzma_lz_options
Definition: lz_decoder.h:47
lzma_check_is_supported
lzma_bool lzma_check_is_supported(lzma_check check) lzma_nothrow lzma_attr_const
Test if the given Check ID is supported.
Definition: check.c:17
lzma_lzma1_encoder_s::longest_match_length
uint32_t longest_match_length
Definition: lzma_encoder_private.h:90
lzma_stream::internal
lzma_internal * internal
Definition: base.h:505
file_pair::src_eof
bool src_eof
True once end of the source file has been detected.
Definition: file_io.h:47
lzma_options_lzma::dict_size
uint32_t dict_size
Dictionary size in bytes.
Definition: lzma12.h:217
lzma_check_init
void lzma_check_init(lzma_check_state *check, lzma_check type)
Initialize *check depending on type.
Definition: check.c:84
lzma_index_padding_size
uint32_t lzma_index_padding_size(const lzma_index *i)
Definition: index.c:593
exit_signal
static volatile sig_atomic_t exit_signal
Definition: signals.c:24
EMPTY_HASH_VALUE
#define EMPTY_HASH_VALUE
Definition: lz_encoder_mf.c:86
lzma_lz_options::preset_dict
const uint8_t * preset_dict
TODO: Comment.
Definition: lz_decoder.h:49
lzma_raw_buffer_encode
lzma_ret lzma_raw_buffer_encode(const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call raw encoder.
Definition: filter_buffer_encoder.c:17
lzma_filters_copy
lzma_ret lzma_filters_copy(const lzma_filter *src, lzma_filter *dest, const lzma_allocator *allocator) lzma_nothrow
Copy the filters array.
Definition: filter_common.c:125
message_fatal
void void void void message_fatal(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints an error message and exits with EXIT_ERROR.
lzma_stream_header_decode
lzma_ret lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
Decode Stream Header.
Definition: stream_flags_decoder.c:31
lzma_lzma2_coder::compressed_size
size_t compressed_size
Definition: lzma2_decoder.c:42
lzma_lzma2_coder::buf_pos
size_t buf_pos
Read position in buf[].
Definition: lzma2_encoder.c:47
opt_mode
enum operation_mode opt_mode
Definition: coder.c:24
xstrdup
char * xstrdup(const char *src) lzma_attribute((__malloc__))
Safe strdup() that never returns NULL.
Definition: util.c:48
tuklib_cpucores.h
Get the number of CPU cores online.
lzma_alone_coder::options
lzma_options_lzma options
Definition: alone_decoder.c:48
message_progress_update
void message_progress_update(void)
Definition: message.c:531
lzma_options_lzma::pb
uint32_t pb
Number of position bits.
Definition: lzma12.h:316
index_tree_append
static void index_tree_append(index_tree *tree, index_tree_node *node)
Definition: index.c:230
lzma_stream::allocator
const lzma_allocator * allocator
Custom memory allocation functions.
Definition: base.h:502
index_cat_info::stream_number_add
uint32_t stream_number_add
Definition: index.c:733
lzma_properties_size
lzma_ret lzma_properties_size(uint32_t *size, const lzma_filter *filter)
Get the size of the Filter Properties field.
Definition: filter_encoder.c:253
lzma_block_uncomp_encode
lzma_ret lzma_block_uncomp_encode(lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call uncompressed .xz Block encoder.
Definition: block_buffer_encoder.c:329
lzma_coder::next
lzma_next_coder next
Next coder in the chain.
Definition: lz_decoder.c:33
lzma_block_header_decode
lzma_ret lzma_block_header_decode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in)
Decode Block Header.
Definition: block_header_decoder.c:34
test_suffix
static size_t test_suffix(const char *suffix, const char *src_name, size_t src_len)
Checks if src_name has given compressed_suffix.
Definition: suffix.c:87
lzma_stream_coder_s::threads_free
worker_thread * threads_free
Definition: stream_encoder_mt.c:159
bufs
static char bufs[4][128]
Buffers for uint64_to_str() and uint64_to_nicestr()
Definition: util.c:18
lzma_dict::full
size_t full
Definition: lz_decoder.h:33
lzma_mf_s::depth
uint32_t depth
Maximum number of loops in the match finder.
Definition: lz_encoder.h:106
lzma_index_prealloc
void lzma_index_prealloc(lzma_index *i, lzma_vli records)
Definition: index.c:431
progress_started
static bool progress_started
Definition: message.c:49
hardware_init
void hardware_init(void)
Definition: hardware.c:139
lzma_internal_s
Definition: common.h:196
lzma_mt::filters
const lzma_filter * filters
Filter chain (alternative to a preset)
Definition: container.h:151
LZMA_FINISH
@ LZMA_FINISH
Finish the coding operation.
Definition: base.h:328
LZMA_TELL_UNSUPPORTED_CHECK
#define LZMA_TELL_UNSUPPORTED_CHECK
Definition: container.h:466
lzma_sha256_init
void lzma_sha256_init(lzma_check_state *check)
Prepare SHA-256 state for new input.
Definition: sha256.c:127
lzma_lz_encoder
Definition: lz_encoder.h:192
coder_add_filter
void coder_add_filter(lzma_vli id, void *options)
Add a filter to the custom filter chain.
Definition: coder.c:107
signals_block
void signals_block(void)
Definition: signals.c:120
lzma_dict::need_reset
bool need_reset
True when dictionary should be reset before decoding more data.
Definition: lz_decoder.h:42
worker_thread_s::progress_in
uint64_t progress_in
Amount of uncompressed data that has already been compressed.
Definition: stream_encoder_mt.c:77
lzma_stream_coder::pos
size_t pos
Write position in buffer[] and position in Stream Padding.
Definition: stream_decoder.c:78
lzma_index_uncompressed_size
lzma_vli lzma_index_uncompressed_size(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the uncompressed size of the file.
Definition: index.c:572
lzma_sha256_finish
void lzma_sha256_finish(lzma_check_state *check)
Finish the SHA-256 calculation and store the result to check->buffer.u8.
Definition: sha256.c:169
file_pair
Definition: file_io.h:31
coder_set_preset
void coder_set_preset(uint32_t new_preset)
Set preset number.
Definition: coder.c:88
lzma_auto_decoder
lzma_ret lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
Decode .xz Streams and .lzma files with autodetection.
Definition: auto_decoder.c:187
threads_end
static void threads_end(lzma_stream_coder *coder, const lzma_allocator *allocator)
Definition: stream_encoder_mt.c:450
lzma_lzma1_encoder_s::fast_mode
bool fast_mode
True if using getoptimumfast.
Definition: lzma_encoder_private.h:93
xz_ver_to_str
static const char * xz_ver_to_str(uint32_t ver)
Convert XZ Utils version number to a string.
Definition: list.c:117
coder_passthru
static bool coder_passthru(file_pair *pair)
Definition: coder.c:840
lzma_index_iter_rewind
void lzma_index_iter_rewind(lzma_index_iter *iter) lzma_nothrow
Rewind the iterator.
Definition: index.c:1092
user_abort
volatile sig_atomic_t user_abort
Definition: signals.c:16
tuklib_physmem.h
Get the amount of physical memory.
worker_thread_s::next
worker_thread * next
Next structure in the stack of free worker threads.
Definition: stream_encoder_mt.c:89
message_set_files
void message_set_files(unsigned int files)
Set the total number of files to be processed.
Definition: message.c:183
lzma_outq_is_readable
bool lzma_outq_is_readable(const lzma_outq *outq)
Test if there is data ready to be read.
Definition: outqueue.c:136
lzma_stream_coder_s::index_encoder
lzma_next_coder index_encoder
Index encoder.
Definition: stream_encoder_mt.c:120
worker_thread_s::progress_out
uint64_t progress_out
Amount of compressed data that is ready.
Definition: stream_encoder_mt.c:80
message_version
void message_version(void)
Prints the version number to stdout and exits with exit status SUCCESS.
Definition: message.c:1060
lzma_lzma1_decoder::rep0
uint32_t rep0
Distance of the latest match.
Definition: lzma_decoder.c:228
lzma_easy_encoder
lzma_ret lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Stream encoder using a preset number.
Definition: easy_encoder.c:17
rc_direct
#define rc_direct(dest, seq)
Decode a bit without using a probability.
Definition: range_decoder.h:171
lzma_coder
Definition: lz_decoder.c:23
lzma_index_coder::index
lzma_index * index
Target Index.
Definition: index_decoder.c:33
lzma_index_iter::compressed_size
lzma_vli compressed_size
Compressed size of this Stream.
Definition: index.h:94
index_tree::root
index_tree_node * root
Root node.
Definition: index.c:48
lzma_next_coder_s::id
lzma_vli id
Definition: common.h:141
lzma_outbuf::size
size_t size
Amount of data written to buf.
Definition: outqueue.h:22
THR_STOP
@ THR_STOP
Definition: stream_encoder_mt.c:39
index_stream_size
static lzma_vli index_stream_size(lzma_vli blocks_size, lzma_vli count, lzma_vli index_list_size)
Calculate the total size of the Stream.
Definition: index.h:65
lzma_block::check
lzma_check check
Type of integrity Check.
Definition: block.h:93
threads_stop
static void threads_stop(lzma_stream_coder *coder, bool wait_for_threads)
Make the threads stop but not exit. Optionally wait for them to stop.
Definition: stream_encoder_mt.c:421
lzma_options_delta::type
lzma_delta_type type
Definition: delta.h:47
lzma_index_size
lzma_vli lzma_index_size(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the size of the Index field as bytes.
Definition: index.c:512
lzma_mt
Multithreading options.
Definition: container.h:66
io_close_dest
static bool io_close_dest(file_pair *pair, bool success)
Closes destination file of the file_pair structure.
Definition: file_io.c:1004
lzma_stream::total_out
uint64_t total_out
Definition: base.h:492
lzma_filter_coder::memusage
uint64_t(* memusage)(const void *options)
Definition: filter_common.h:30
lzma_outq_init
lzma_ret lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator, uint64_t buf_size_max, uint32_t threads)
Initialize an output queue.
Definition: outqueue.c:57
lzma_lzma1_decoder::dist_slot
probability dist_slot[DIST_STATES][DIST_SLOTS]
Definition: lzma_decoder.c:202
exit_status
static enum exit_status_type exit_status
Exit status to use. This can be changed with set_exit_status().
Definition: main.c:17
io_unlink
static void io_unlink(const char *name, const struct stat *known_st)
Unlink a file.
Definition: file_io.c:289
lzma_version_number
uint32_t lzma_version_number(void) lzma_nothrow lzma_attr_const
Run-time version number as an integer.
Definition: common.c:21
lzma_stream_buffer_encode
lzma_ret lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
Single-call .xz Stream encoder.
Definition: stream_buffer_encoder.c:44
lzma_index_iter::compressed_offset
lzma_vli compressed_offset
Compressed start offset of this Stream.
Definition: index.h:78
rc_bit_case
#define rc_bit_case(prob, action0, action1, seq)
Definition: range_decoder.h:166
move_pos
static void move_pos(lzma_mf *mf)
Mark the current byte as processed from point of view of the match finder.
Definition: lz_encoder_mf.c:150
rc_bit
#define rc_bit(prob, action0, action1, seq)
Definition: range_decoder.h:154
index_tree::rightmost
index_tree_node * rightmost
Definition: index.c:57
lzma_length_decoder
Length decoder probabilities; see comments in lzma_common.h.
Definition: lzma_decoder.c:161
index_stream::number
uint32_t number
Number of this Stream (first one is 1)
Definition: index.c:112
LZMA_CHECK_NONE
@ LZMA_CHECK_NONE
Definition: check.h:28
stream_flags.h
.xz Stream Header and Stream Footer encoder and decoder
lzma_range_encoder::probs
probability * probs[RC_SYMBOLS_MAX]
Probabilities associated with RC_BIT_0 or RC_BIT_1.
Definition: range_encoder.h:49
set_exit_status
void set_exit_status(enum exit_status_type new_status)
Definition: main.c:31
progress_percentage
static const char * progress_percentage(uint64_t in_pos)
Make the string indicating completion percentage.
Definition: message.c:285
lzma_index_hash_decode
lzma_ret lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in, size_t *in_pos, size_t in_size)
Decode and validate the Index field.
Definition: index_hash.c:175
lzma_index_hash_info::blocks_size
lzma_vli blocks_size
Sum of the Block sizes (including Block Padding)
Definition: index_hash.c:20
hardware_threads_set
void hardware_threads_set(uint32_t threadlimit)
Set the maximum number of worker threads.
Definition: hardware.c:31
lzma_stream_footer_decode
lzma_ret lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result
Decode Stream Footer.
Definition: stream_flags_decoder.c:60
lzma_mf_s::action
lzma_action action
Definition: lz_encoder.h:119
lzma_easy_encoder_memusage
uint64_t lzma_easy_encoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure
Calculate approximate memory usage of easy encoder.
Definition: easy_encoder_memusage.c:17
lzma_lzma1_decoder::is_rep2
probability is_rep2[STATES]
If 0, distance of a repeated match is rep2. Otherwise it is rep3.
Definition: lzma_decoder.c:193
stdin_flags
static int stdin_flags
Definition: file_io.c:77
io_open_dest
bool io_open_dest(file_pair *pair)
Open the destination file.
Definition: file_io.c:987
block_header_info::memusage
uint64_t memusage
Decoder memory usage for this Block.
Definition: list.c:52
LZMA_GET_CHECK
@ LZMA_GET_CHECK
Integrity check type is now available.
Definition: base.h:115
MUST_NORMALIZE_POS
#define MUST_NORMALIZE_POS
Definition: lz_encoder_mf.c:91
lzma_action
lzma_action
The ‘action’ argument for lzma_code()
Definition: base.h:250
delta_encoder.h
Delta filter encoder.
lzma_index_iter::compressed_stream_offset
lzma_vli compressed_stream_offset
Compressed start offset of this Block.
Definition: index.h:162
rc_to_local
#define rc_to_local(range_decoder, in_pos)
Definition: range_decoder.h:54
dict_write
static void dict_write(lzma_dict *restrict dict, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, size_t *restrict left)
Copies arbitrary amount of data into the dictionary.
Definition: lz_decoder.h:203
args_info::files_delim
char files_delim
Delimiter for filenames read from files_file.
Definition: args.h:29
message_set_files
void message_set_files(unsigned int files)
Set the total number of files to be processed.
Definition: message.c:183
lzma_block_coder
Definition: block_decoder.c:18
coder_set_check
void coder_set_check(lzma_check check)
Set the integrity check type used when compressing.
Definition: coder.c:64
lzma_index_checks
uint32_t lzma_index_checks(const lzma_index *i)
Get the types of integrity Checks.
Definition: index.c:579
file_pair::dest_st
struct stat dest_st
Stat of the destination file.
Definition: file_io.h:62
is_empty_filename
bool is_empty_filename(const char *filename)
Check if filename is empty and print an error message.
Definition: util.c:254
rc_normalize
#define rc_normalize(seq)
Definition: range_decoder.h:87
lzma_filter_flags_decode
lzma_ret lzma_filter_flags_decode(lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result
Decode Filter Flags from given buffer.
Definition: filter_flags_decoder.c:17
crc_macros.h
Some endian-dependent macros for CRC32 and CRC64.
lzma_mf_s::size
uint32_t size
Definition: lz_encoder.h:39
lzma_index_init
lzma_index * lzma_index_init(const lzma_allocator *allocator)
Allocate and initialize a new lzma_index structure.
Definition: index.c:398
tuklib_open_stdxxx.h
Make sure that file descriptors 0, 1, and 2 are open.
hardware_memlimit_get
uint64_t hardware_memlimit_get(enum operation_mode mode)
Get the current memory usage limit for compression or decompression.
Definition: hardware.c:82
index_cat_info::uncompressed_size
lzma_vli uncompressed_size
Uncompressed size of the destination.
Definition: index.c:722
lzma_block_coder::uncompressed_size
lzma_vli uncompressed_size
Uncompressed Size calculated while decoding.
Definition: block_decoder.c:36
lzma_stream_buffer_bound
size_t lzma_stream_buffer_bound(size_t uncompressed_size) lzma_nothrow
Calculate output buffer size for single-call Stream encoder.
Definition: stream_buffer_encoder.c:26
check
static lzma_check check
Integrity check type.
Definition: coder.c:49
lzma_index_hash_append
lzma_ret lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size, lzma_vli uncompressed_size)
Add a new Record to an Index hash.
Definition: index_hash.c:144
message_strm
const char * message_strm(lzma_ret code)
Convert lzma_ret to a string.
Definition: message.c:789
lzma_index_s::total_size
lzma_vli total_size
Total size of all the Blocks in the Stream(s)
Definition: index.c:155
lzma_index_size
lzma_vli lzma_index_size(const lzma_index *i)
Get the size of the Index field as bytes.
Definition: index.c:512
LZMA_NEXT_CODER_INIT
#define LZMA_NEXT_CODER_INIT
Macro to initialize lzma_next_coder structure.
Definition: common.h:180
lzma_auto_decoder
lzma_ret lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result
Decode .xz Streams and .lzma files with autodetection.
Definition: auto_decoder.c:187
hardware.h
Detection of available hardware resources.
stream_flags_common.h
Common stuff for Stream flags coders.
lzma_stream_coder_s::timeout
uint32_t timeout
Definition: stream_encoder_mt.c:139
lzma_block_header_size_decode
#define lzma_block_header_size_decode(b)
Decode the Block Header Size field.
Definition: block.h:285
lzma_stream_footer_encode
lzma_ret lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
Encode Stream Footer.
Definition: stream_flags_encoder.c:57
mf_find
#define mf_find
Since everything else begins with mf_, use it also for lzma_mf_find().
Definition: lz_encoder.h:259
check_names
static const char check_names[LZMA_CHECK_ID_MAX+1][12]
Check ID to string mapping.
Definition: list.c:61
message_verbosity_increase
void message_verbosity_increase(void)
Increase verbosity level by one step unless it was at maximum.
Definition: message.c:156
lzma_lzma2_coder::lzma
lzma_lz_decoder lzma
LZMA decoder.
Definition: lzma2_decoder.c:35
message_mem_needed
void message_mem_needed(enum message_verbosity v, uint64_t memusage)
Display how much memory was needed and how much the limit was.
Definition: message.c:832
io_open_src
file_pair * io_open_src(const char *src_name)
Open the source file.
Definition: file_io.c:739
lzma_lzma1_encoder_s::matches
lzma_match matches[MATCH_LEN_MAX+1]
Array of match candidates.
Definition: lzma_encoder_private.h:83
lzma_raw_encoder
lzma_ret lzma_raw_encoder(lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result
Initialize raw encoder.
Definition: filter_encoder.c:208
options_lzma
lzma_options_lzma * options_lzma(const char *str)
Parser for LZMA options.
Definition: options.c:317
list_file
void list_file(const char *filename)
List information about the given .xz file.
Definition: list.c:1143
lzma_lzma1_decoder::limit
uint32_t limit
Definition: lzma_decoder.c:277
message_filters_to_str
void message_filters_to_str(char buf[FILTERS_STR_SIZE], const lzma_filter *filters, bool all_known)
Get the filter chain as a string.
Definition: message.c:903
lzma_lzma1_decoder::is_rep0_long
probability is_rep0_long[STATES][POS_STATES_MAX]
Definition: lzma_decoder.c:197
lzma_stream_coder_s::stream_flags
lzma_stream_flags stream_flags
Stream Flags for encoding the Stream Header and Stream Footer.
Definition: stream_encoder_mt.c:124
options_bcj
lzma_options_bcj * options_bcj(const char *str)
Parser for BCJ options.
Definition: options.c:209
lzma_index_coder::memlimit
uint64_t memlimit
Memory usage limit.
Definition: index_decoder.c:30
lzma_outq_memusage
uint64_t lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads)
Calculate the memory usage of an output queue.
Definition: outqueue.c:42
wait_for_work
static bool wait_for_work(lzma_stream_coder *coder, mythread_condtime *wait_abs, bool *has_blocked, bool has_input)
Definition: stream_encoder_mt.c:621
LZMA2_HEADER_UNCOMPRESSED
#define LZMA2_HEADER_UNCOMPRESSED
Size of a header for uncompressed chunk.
Definition: lzma2_encoder.h:30
lzma_block_buffer_decode
lzma_ret lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Single-call .xz Block decoder.
Definition: block_buffer_decoder.c:17
lz_decoder.h
LZ out window.
lzma_check
lzma_check
Type of the integrity check (Check ID)
Definition: check.h:27
lzma_mf_s::hash_count
uint32_t hash_count
Number of elements in hash[].
Definition: lz_encoder.h:122
lzma_internal_s::next
lzma_next_coder next
The actual coder that should do something useful.
Definition: common.h:198
index_record
Definition: index.c:65
lzma_properties_size
lzma_ret lzma_properties_size(uint32_t *size, const lzma_filter *filter) lzma_nothrow
Get the size of the Filter Properties field.
Definition: filter_encoder.c:253
lzma_alone_coder::uncompressed_size
lzma_vli uncompressed_size
Uncompressed size decoded from the header.
Definition: alone_decoder.c:38
lzma_index_iter::flags
const lzma_stream_flags * flags
Pointer to Stream Flags.
Definition: index.h:51
POS_STATES_MAX
#define POS_STATES_MAX
Definition: lzma_common.h:28
index_stream_end
static void index_stream_end(void *node, const lzma_allocator *allocator)
Free the memory allocated for a Stream and its Record groups.
Definition: index.c:370
initialize_new_thread
static lzma_ret initialize_new_thread(lzma_stream_coder *coder, const lzma_allocator *allocator)
Initialize a new worker_thread structure and create a new thread.
Definition: stream_encoder_mt.c:472
lzma_coder::lz
lzma_lz_decoder lz
The actual LZ-based decoder e.g. LZMA.
Definition: lz_decoder.c:28
lzma_stream_footer_decode
lzma_ret lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
Decode Stream Footer.
Definition: stream_flags_decoder.c:60
lzma_lzma1_decoder::is_rep1
probability is_rep1[STATES]
Definition: lzma_decoder.c:190
lzma_block_decoder
lzma_ret lzma_block_decoder(lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Block decoder.
Definition: block_decoder.c:249
lzma_delta_coder::history
uint8_t history[LZMA_DELTA_DIST_MAX]
Buffer to hold history of the original data.
Definition: delta_private.h:29
lzma_stream_coder_s::header_pos
size_t header_pos
Read position in header[].
Definition: stream_encoder_mt.c:130
lzma_index_s::index_list_size
lzma_vli index_list_size
Definition: index.c:166
io_read
size_t io_read(file_pair *pair, io_buf *buf, size_t size)
Reads from the source file to a buffer.
Definition: file_io.c:1112
lzma_index_hash_append
lzma_ret lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result
Add a new Record to an Index hash.
Definition: index_hash.c:144
lzma_filter_flags_encode
lzma_ret lzma_filter_flags_encode(const lzma_filter *filter, uint8_t *out, size_t *out_pos, size_t out_size)
Encode Filter Flags into given buffer.
Definition: filter_flags_encoder.c:31
flush_needed
bool flush_needed
True when flushing is needed due to expired timeout.
Definition: mytime.c:20
block_header_info::compressed_size
lzma_vli compressed_size
Size of the Compressed Data field in the Block.
Definition: list.c:49
lzma_stream_buffer_decode
lzma_ret lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
Single-call .xz Stream decoder.
Definition: stream_buffer_decoder.c:17
lzma_coder::lz
lzma_lz_encoder lz
LZ-based encoder e.g. LZMA.
Definition: lz_encoder.c:28
parse_options
static void parse_options(int argc, char **argv)
Parses command line options.
Definition: xzdec.c:96
lzma_allocator::opaque
void * opaque
Pointer passed to .alloc() and .free()
Definition: base.h:432
message_warning
void void message_warning(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints a warning and possibly sets exit status.
lzma_stream::avail_out
size_t avail_out
Definition: base.h:491
coder_run
void coder_run(const char *filename)
Compress or decompress the given file.
Definition: coder.c:863
HEADERS_BOUND
#define HEADERS_BOUND
Stream Header, Stream Footer, and Index.
Definition: stream_buffer_encoder.c:22
lzma_simple_x86
Definition: x86.c:20
lzma_stream_coder::buffer_size
size_t buffer_size
Total number of bytes in buffer[].
Definition: stream_encoder.c:53
lzma_options_lzma::lc
uint32_t lc
Number of literal context bits.
Definition: lzma12.h:281
lzma_filter_flags_decode
lzma_ret lzma_filter_flags_decode(lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size)
Decode Filter Flags from given buffer.
Definition: filter_flags_decoder.c:17
compressed_name
static char * compressed_name(const char *src_name, size_t src_len)
Appends suffix to src_name.
Definition: suffix.c:196
lzma_filter_encoder_is_supported
lzma_bool lzma_filter_encoder_is_supported(lzma_vli id)
Test if the given Filter ID is supported for encoding.
Definition: filter_encoder.c:165
totals
static struct @24 totals
LZMA_RUN
@ LZMA_RUN
Continue coding.
Definition: base.h:251
lzma_index_iter::uncompressed_offset
lzma_vli uncompressed_offset
Uncompressed start offset of this Stream.
Definition: index.h:86
mytime_get_elapsed
uint64_t mytime_get_elapsed(void)
Get the number of milliseconds since the operation started.
Definition: mytime.c:62
lzma_filter_decoder::id
lzma_vli id
Filter ID.
Definition: filter_decoder.c:23
lzma_filters_update
lzma_ret lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
Update the filter chain in the encoder.
Definition: filter_encoder.c:172
lzma_raw_decoder_memusage
uint64_t lzma_raw_decoder_memusage(const lzma_filter *filters) lzma_nothrow lzma_attr_pure
Calculate approximate memory requirements for raw decoder.
Definition: filter_decoder.c:161
LZMA_MF_BT4
@ LZMA_MF_BT4
Binary Tree with 2-, 3-, and 4-byte hashing.
Definition: lzma12.h:101
index_stream::index_list_size
lzma_vli index_list_size
Definition: index.c:130
index_group
Definition: index.c:71
lzma_lzma1_encoder_s::is_flushed
bool is_flushed
Definition: lzma_encoder_private.h:101
return_if_error
#define return_if_error(expr)
Return if expression doesn't evaluate to LZMA_OK.
Definition: common.h:278
lzma_index_hash_info
Definition: index_hash.c:18
rc_update_1
#define rc_update_1(prob)
Definition: range_decoder.h:128
LZMA_STREAM_END
@ LZMA_STREAM_END
End of stream was reached.
Definition: base.h:63
lzma_index_iter::uncompressed_size
lzma_vli uncompressed_size
Uncompressed size of this Stream.
Definition: index.h:99
io_init
void io_init(void)
Initialize the I/O module.
Definition: file_io.c:95
lzma_index_stream_padding
lzma_ret lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding) lzma_nothrow lzma_attr_warn_unused_result
Set the amount of Stream Padding.
Definition: index.c:618
coder_set_preset
void coder_set_preset(uint32_t new_preset)
Set preset number.
Definition: coder.c:88
lzma_lz_options::nice_len
size_t nice_len
Definition: lz_encoder.h:148
PREALLOC_MAX
#define PREALLOC_MAX
How many Records can be allocated at once at maximum.
Definition: index.c:25
options.h
Parser for filter-specific options.
lzma_version_string
const char * lzma_version_string(void) lzma_nothrow lzma_attr_const
Run-time version as a string.
Definition: common.c:28
lzma_easy_buffer_encode
lzma_ret lzma_easy_buffer_encode(uint32_t preset, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Single-call .xz Stream encoding using a preset number.
Definition: easy_buffer_encoder.c:17
V_ERROR
@ V_ERROR
Only error messages.
Definition: message.h:16
lzma_block::header_size
uint32_t header_size
Size of the Block Header field.
Definition: block.h:72
set_exit_no_warn
void set_exit_no_warn(void)
Definition: main.c:51
worker_thread_s::thread_id
mythread thread_id
Definition: stream_encoder_mt.c:96
rc_reset
#define rc_reset(range_decoder)
Resets the range decoder structure.
Definition: range_decoder.h:69
lzma_index_s
Definition: index.c:145
LZMA_INDEX_ITER_STREAM
@ LZMA_INDEX_ITER_STREAM
Get the next Stream.
Definition: index.h:238
message_progress_sigs
const int message_progress_sigs[]
Signals used for progress message handling.
coder_set_check
void coder_set_check(lzma_check new_check)
Set the integrity check type used when compressing.
Definition: coder.c:64
mytime.h
Time handling functions.
lzma_simple_coder::end_was_reached
bool end_was_reached
True if the next coder in the chain has returned LZMA_STREAM_END.
Definition: simple_private.h:24
lzma_lz_decoder::coder
void * coder
Data specific to the LZ-based decoder.
Definition: lz_decoder.h:56
LZMA_CONCATENATED
#define LZMA_CONCATENATED
Definition: container.h:515
dict_repeat
static bool dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
Repeat *len bytes at distance.
Definition: lz_decoder.h:128
lzma_index_iter::block_count
lzma_vli block_count
Number of Blocks in the Stream.
Definition: index.h:70
lzma_free
void lzma_free(void *ptr, const lzma_allocator *allocator)
Frees memory.
Definition: common.c:78
args_info::files_name
char * files_name
Definition: args.h:22
index_tree
AVL tree to hold index_stream or index_group structures.
Definition: index.c:46
lzma_lz_options::after_size
size_t after_size
Definition: lz_encoder.h:139
lzma_check_state::buffer
union lzma_check_state::@3 buffer
Buffer to hold the final result and a temporary buffer for SHA256.
lzma_lzma_lclppb_decode
bool lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
Decodes the LZMA Properties byte (lc/lp/pb)
Definition: lzma_decoder.c:1000
lzma_coder::temp
struct lzma_coder::@20 temp
hooked_signals
static sigset_t hooked_signals
Definition: signals.c:28
lzma_properties_decode
lzma_ret lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *props, size_t props_size)
Decode the Filter Properties field.
Definition: filter_decoder.c:169
lzma_block::uncompressed_size
lzma_vli uncompressed_size
Uncompressed Size in bytes.
Definition: block.h:172
lzma_stream::next_out
uint8_t * next_out
Definition: base.h:490
lzma_range_encoder::symbols
enum lzma_range_encoder::@23 symbols[RC_SYMBOLS_MAX]
Symbols to encode.
lzma_encoder.h
LZMA encoder API.
opt_block_list
uint64_t * opt_block_list
Definition: coder.c:29
lzma_simple_coder::filtered
size_t filtered
Definition: simple_private.h:55
lzma_block_header_size
lzma_ret lzma_block_header_size(lzma_block *block)
Calculate Block Header Size.
Definition: block_header_encoder.c:18
lzma_filter_coder::init
lzma_init_function init
Definition: filter_common.h:26
lzma_index_hash_init
lzma_index_hash * lzma_index_hash_init(lzma_index_hash *index_hash, const lzma_allocator *allocator)
Allocate and initialize a new lzma_index_hash structure.
Definition: index_hash.c:73
suffix_set
void suffix_set(const char *suffix)
Set a custom filename suffix.
Definition: suffix.c:388
progress_automatic
static bool progress_automatic
Definition: message.c:45
hash_append
static lzma_ret hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size, lzma_vli uncompressed_size)
Updates the sizes and the hash without any validation.
Definition: index_hash.c:126
LZMA_FILTER_IA64
#define LZMA_FILTER_IA64
Definition: bcj.h:32
lzma_stream_coder::index
lzma_index * index
Index to hold sizes of the Blocks.
Definition: stream_encoder.c:47
lzma_mf_s::skip
void(* skip)(lzma_mf *mf, uint32_t num)
Definition: lz_encoder.h:97
lzma_lzma1_decoder::pos_align
probability pos_align[ALIGN_SIZE]
Definition: lzma_decoder.c:210
copy_and_encode
static void copy_and_encode(lzma_delta_coder *coder, const uint8_t *restrict in, uint8_t *restrict out, size_t size)
Definition: delta_encoder.c:21
lzma_options_delta
Options for the Delta filter.
Definition: delta.h:45
base.h
Data types and functions used in many places in liblzma API.
lzma_options_bcj::start_offset
uint32_t start_offset
Start offset for conversions.
Definition: bcj.h:88
lzma_index_checks
uint32_t lzma_index_checks(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the types of integrity Checks.
Definition: index.c:579
version.h
Version number.
mf_read
static void mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size, size_t *left)
Definition: lz_encoder.h:279
args.h
Argument parsing.
CHECKS_STR_SIZE
#define CHECKS_STR_SIZE
Definition: list.c:90
lzma_stream_coder_s::threads_initialized
uint32_t threads_initialized
Definition: stream_encoder_mt.c:154
thousand
static enum @28 thousand
Thousand separator support in uint64_to_str() and uint64_to_nicestr()
lzma_simple_coder::pos
size_t pos
Definition: simple_private.h:51
lzma_lz_decoder::end
void(* end)(void *coder, const lzma_allocator *allocator)
Free allocated resources.
Definition: lz_decoder.h:69
message_strm
const char * message_strm(lzma_ret code)
Convert lzma_ret to a string.
Definition: message.c:789
lzma_stream_coder_s
Definition: stream_encoder_mt.c:100
lzma_filter_decoder::props_decode
lzma_ret(* props_decode)(void **options, const lzma_allocator *allocator, const uint8_t *props, size_t props_size)
Definition: filter_decoder.c:38
lzma_allocator::free
void(* free)(void *opaque, void *ptr)
Pointer to a custom memory freeing function.
Definition: base.h:421
message_help
void message_help(bool long_help)
Print the help message.
Definition: message.c:1077
lzma_next_coder_s::code
lzma_code_function code
Pointer to function to do the actual coding.
Definition: common.h:150
lzma_index_uncompressed_size
lzma_vli lzma_index_uncompressed_size(const lzma_index *i)
Get the uncompressed size of the file.
Definition: index.c:572
worker_thread_s::in
uint8_t * in
Definition: stream_encoder_mt.c:56
xrealloc
void * xrealloc(void *ptr, size_t size)
Safe realloc() that never returns NULL.
Definition: util.c:25
args_info::arg_names
char ** arg_names
Filenames from command line.
Definition: args.h:15
lzma_end
void lzma_end(lzma_stream *strm) lzma_nothrow
Free memory allocated for the coder data structures.
Definition: common.c:353
lzma_block_coder::next
lzma_next_coder next
The filters in the chain; initialized with lzma_raw_decoder_init().
Definition: block_decoder.c:26
lzma_mf_s::keep_size_before
uint32_t keep_size_before
Definition: lz_encoder.h:45
THR_RUN
@ THR_RUN
Encoding is in progress.
Definition: stream_encoder_mt.c:31
simple_private.h
Private definitions for so called simple filters.
lzma_lz_encoder::options_update
lzma_ret(* options_update)(void *coder, const lzma_filter *filter)
Update the options in the middle of the encoding.
Definition: lz_encoder.h:205
memcmplen.h
Optimized comparison of two buffers.
lzma_index_hash_s::remaining
lzma_vli remaining
Number of Records not fully decoded.
Definition: index_hash.c:55
xz_file_info::min_version
uint32_t min_version
Oldest XZ Utils version that will decompress the file.
Definition: list.c:33
lzma_filter_flags_size
lzma_ret lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter) lzma_nothrow lzma_attr_warn_unused_result
Calculate encoded size of a Filter Flags field.
Definition: filter_flags_encoder.c:17
lzma_memlimit_get
uint64_t lzma_memlimit_get(const lzma_stream *strm) lzma_nothrow lzma_attr_pure
Get the current memory usage limit.
Definition: common.c:411
LZMA_FILTERS_MAX
#define LZMA_FILTERS_MAX
Maximum number of filters in a chain.
Definition: filter.h:26
LZMA_CHECK_SIZE_MAX
#define LZMA_CHECK_SIZE_MAX
Maximum size of a Check field.
Definition: check.h:102
lzma_index_file_size
lzma_vli lzma_index_file_size(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the total size of the file.
Definition: index.c:560
index_stream::stream_flags
lzma_stream_flags stream_flags
Definition: index.c:136
lzma_next_coder_s::coder
void * coder
Pointer to coder-specific data.
Definition: common.h:137
lzma_stream_coder::buffer
uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX]
Definition: stream_decoder.c:82
signals_exit
void signals_exit(void)
Definition: signals.c:153
filters_count
static uint32_t filters_count
Number of filters. Zero indicates that we are using a preset.
Definition: coder.c:43
lzma_simple_coder::size
size_t size
Definition: simple_private.h:59
io_fix_src_pos
void io_fix_src_pos(file_pair *pair, size_t rewind_size)
Fix the position in src_fd.
Definition: file_io.c:1097
progress_active
static bool progress_active
Definition: message.c:54
lzma_lzma1_decoder::offset
uint32_t offset
Definition: lzma_decoder.c:281
LZMA_STREAM_HEADER_SIZE
#define LZMA_STREAM_HEADER_SIZE
Size of Stream Header and Stream Footer.
Definition: stream_flags.h:27
LZMA_FULL_FLUSH
@ LZMA_FULL_FLUSH
Finish encoding of the current Block.
Definition: base.h:290
lzma_match_finder
lzma_match_finder
Match finders.
Definition: lzma12.h:58
lzma_next_strm_init
#define lzma_next_strm_init(func, strm,...)
Definition: common.h:303
index_group::number_base
lzma_vli number_base
Number of Blocks in this Stream before this group.
Definition: index.c:76
lzma_stream_encoder_mt
lzma_ret lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options) lzma_nothrow lzma_attr_warn_unused_result
Initialize multithreaded .xz Stream encoder.
Definition: stream_encoder_mt.c:1079
LZMA_STREAM_INIT
#define LZMA_STREAM_INIT
Initialization for lzma_stream.
Definition: base.h:545
opt_single_stream
bool opt_single_stream
If true, stop after decoding the first stream.
Definition: coder.c:27
lzma_lzma_lclppb_decode
bool lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
Decodes the LZMA Properties byte (lc/lp/pb)
Definition: lzma_decoder.c:1000
lzma_alone_coder::picky
bool picky
Definition: alone_decoder.c:32
uncompressed_name
static char * uncompressed_name(const char *src_name, const size_t src_len)
Removes the filename suffix of the compressed file.
Definition: suffix.c:110
mythread.h
Some threading related helper macros and functions.
lzma_block::ignore_check
lzma_bool ignore_check
A flag to Block decoder to not verify the Check field.
Definition: block.h:261
preset_number
static uint32_t preset_number
Number of the preset (0-9)
Definition: coder.c:46
lzma_mf_s::buffer
uint8_t * buffer
Pointer to buffer with data to be compressed.
Definition: lz_encoder.h:35
lzma_block_encoder
lzma_ret lzma_block_encoder(lzma_stream *strm, lzma_block *block)
Initialize .xz Block encoder.
Definition: block_encoder.c:215
lzma_stream_coder::tell_any_check
bool tell_any_check
If true, LZMA_GET_CHECK is returned after decoding Stream Header.
Definition: stream_decoder.c:58
lzma_lzma_lclppb_encode
bool lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
Encodes lc/lp/pb into one byte. Returns false on success and true on error.
Definition: lzma_encoder.c:645
LZMA_MF_BT2
@ LZMA_MF_BT2
Binary Tree with 2-byte hashing.
Definition: lzma12.h:81
lzma_lzma1_decoder::rep_len_decoder
lzma_length_decoder rep_len_decoder
Length of a repeated match.
Definition: lzma_decoder.c:216
lzma_stream_coder_s::outq
lzma_outq outq
Output buffer queue for compressed data.
Definition: stream_encoder_mt.c:134
io_write
bool io_write(file_pair *pair, const io_buf *buf, size_t size)
Writes a buffer to the destination file.
Definition: file_io.c:1261
lzma_index_stream_size
lzma_vli lzma_index_stream_size(const lzma_index *i)
Get the total size of the Stream.
Definition: index.c:526
lzma_end_function
void(* lzma_end_function)(void *coder, const lzma_allocator *allocator)
Type of a function to free the memory allocated for the coder.
Definition: common.h:113
lzma_stream_decoder
lzma_ret lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Stream decoder.
Definition: stream_decoder.c:459
lzma_index_iter_next
lzma_bool lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode) lzma_nothrow lzma_attr_warn_unused_result
Get the next Block or Stream.
Definition: index.c:1103
option_map
Definition: options.c:26
lzma_index_coder::iter
lzma_index_iter iter
Iterator for the Index being encoded.
Definition: index_encoder.c:33
lzma_lzma1_encoder_s::state
lzma_lzma_state state
State.
Definition: lzma_encoder_private.h:77
lzma_delta_coder::next
lzma_next_coder next
Next coder in the chain.
Definition: delta_private.h:20
UNPADDED_SIZE_MAX
#define UNPADDED_SIZE_MAX
Maximum Unpadded Size.
Definition: index.h:23
args_info
Definition: args.h:13
LZMA_IGNORE_CHECK
#define LZMA_IGNORE_CHECK
Definition: container.h:498
lzma_index_hash_s::unpadded_size
lzma_vli unpadded_size
Unpadded Size currently being read from an Index Record.
Definition: index_hash.c:58
lzma_index_memusage
uint64_t lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
Calculate memory usage of lzma_index.
Definition: index.c:442
block_encoder.h
Encodes .xz Blocks.
LZMA_FULL_BARRIER
@ LZMA_FULL_BARRIER
Finish encoding of the current Block.
Definition: base.h:305
lzma_dict::size
size_t size
Size of the dictionary.
Definition: lz_decoder.h:39
io_no_sparse
void io_no_sparse(void)
Disable creation of sparse files when decompressing.
Definition: file_io.c:151
worker_thread_s::allocator
const lzma_allocator * allocator
Definition: stream_encoder_mt.c:74
lzma_block_coder::check_pos
size_t check_pos
Position when reading the Check field.
Definition: block_decoder.c:44
lzma_options_lzma::lp
uint32_t lp
Number of literal position bits.
Definition: lzma12.h:293
lzma_options_delta::dist
uint32_t dist
Delta distance.
Definition: delta.h:59
threads_max
static uint32_t threads_max
Definition: hardware.c:18
signals_unblock
void signals_unblock(void)
Unblock the signals blocked by signals_block().
Definition: signals.c:135
suffix_get_dest_name
char * suffix_get_dest_name(const char *src_name)
Get the name of the destination file.
Definition: suffix.c:373
message_filters_show
void message_filters_show(enum message_verbosity v, const lzma_filter *filters)
Print the filter chain.
Definition: message.c:1036
parse_details
static bool parse_details(file_pair *pair, const lzma_index_iter *iter, block_header_info *bhi, xz_file_info *xfi)
Parse detailed information about a Block.
Definition: list.c:594
is_tty_stdin
bool is_tty_stdin(void)
Test if stdin is a terminal.
Definition: util.c:266
message_verbosity_get
enum message_verbosity message_verbosity_get(void)
Get the current verbosity level.
Definition: message.c:176
lzma_simple_coder
Definition: simple_private.h:19
LZMA_MODE_FAST
@ LZMA_MODE_FAST
Fast compression.
Definition: lzma12.h:139
lzma_physmem
uint64_t lzma_physmem(void)
Get the total amount of physical memory (RAM) in bytes.
Definition: hardware_physmem.c:19
lzma_stream_coder_s::block_size
size_t block_size
Definition: stream_encoder_mt.c:110
lzma_index_iter::total_size
lzma_vli total_size
Total compressed size.
Definition: index.h:197
lzma_index_append
lzma_ret lzma_index_append(lzma_index *i, const lzma_allocator *allocator, lzma_vli unpadded_size, lzma_vli uncompressed_size)
Add a new Block to lzma_index.
Definition: index.c:640
hardware_memlimit_get
uint64_t hardware_memlimit_get(enum operation_mode mode)
Get the current memory usage limit for compression or decompression.
Definition: hardware.c:82
lzma_options_bcj
Options for BCJ filters.
Definition: bcj.h:73
block_decoder.h
Decodes .xz Blocks.
lzma_decoder_init
static lzma_ret lzma_decoder_init(lzma_lz_decoder *lz, const lzma_allocator *allocator, const void *options, lzma_lz_options *lz_options)
Definition: lzma_decoder.c:970
lzma_lzma1_encoder_s::is_initialized
bool is_initialized
Definition: lzma_encoder_private.h:97
lzma_block_coder::block
lzma_block * block
Definition: block_decoder.c:30
lzma_index_hash_info::index_list_size
lzma_vli index_list_size
Size of the List of Index Records as bytes.
Definition: index_hash.c:29
LZMA_VERSION_STRING
#define LZMA_VERSION_STRING
Compile-time version as a string.
Definition: version.h:92
lzma_stream_flags_compare
lzma_ret lzma_stream_flags_compare(const lzma_stream_flags *a, const lzma_stream_flags *b) lzma_nothrow lzma_attr_pure
Compare two lzma_stream_flags structures.
Definition: stream_flags_common.c:21
lzma_filter_encoder::block_size
uint64_t(* block_size)(const void *options)
Definition: filter_encoder.c:37
lzma_memusage
uint64_t lzma_memusage(const lzma_stream *strm) lzma_nothrow lzma_attr_pure
Get the memory usage of decoder filter chain.
Definition: common.c:394
lzma_options_easy
Definition: easy_preset.h:16
io_wait
static io_wait_ret io_wait(file_pair *pair, int timeout, bool is_reading)
Waits for input or output to become available or for a signal.
Definition: file_io.c:237
lzma_alone_encoder
lzma_ret lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options) lzma_nothrow lzma_attr_warn_unused_result
Initialize .lzma encoder (legacy file format)
Definition: alone_encoder.c:155
opt_block_size
uint64_t opt_block_size
Definition: coder.c:28
lzma_index_cat
lzma_ret lzma_index_cat(lzma_index *dest, lzma_index *src, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
Concatenate lzma_indexes.
lzma_mf_s::keep_size_after
uint32_t keep_size_after
Definition: lz_encoder.h:51
lzma_index_hash_s
Definition: index_hash.c:37
progress_sizes
static const char * progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
Definition: message.c:309
lzma_simple_coder::next
lzma_next_coder next
Next filter in the chain.
Definition: simple_private.h:21
LZMA_INDEX_ITER_BLOCK
@ LZMA_INDEX_ITER_BLOCK
Get the next Block.
Definition: index.h:249
lzma_index_s::prealloc
size_t prealloc
Definition: index.c:171
io_close
void io_close(file_pair *pair, bool success)
Closes the file descriptors and frees possible allocated memory.
Definition: file_io.c:1048
lzma_filter_decoder::init
lzma_init_function init
Definition: filter_decoder.c:27
lzma_check_size
uint32_t lzma_check_size(lzma_check type)
Get the size of the Check field with the given Check ID.
Definition: check.c:64
lzma_options_lzma::preset_dict
const uint8_t * preset_dict
Pointer to an initial dictionary.
Definition: lzma12.h:240
io_buf
Definition: file_io.h:24
lzma_lzma1_decoder::rep2
uint32_t rep2
Distance of third latest match.
Definition: lzma_decoder.c:230
lzma_next_filter_update
lzma_ret lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter *reversed_filters)
Definition: common.c:123
index_tree_next
static void * index_tree_next(const index_tree_node *node)
Get the next node in the tree. Return NULL if there are no more nodes.
Definition: index.c:294
LZMA2_UNCOMPRESSED_MAX
#define LZMA2_UNCOMPRESSED_MAX
Maximum uncompressed size of LZMA chunk (no headers)
Definition: lzma2_encoder.h:24
LZMA2_CHUNK_MAX
#define LZMA2_CHUNK_MAX
Maximum number of bytes of actual data per chunk (no headers)
Definition: lzma2_encoder.h:21
THR_FINISH
@ THR_FINISH
Definition: stream_encoder_mt.c:35
lzma_index_total_size
lzma_vli lzma_index_total_size(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the total size of the Blocks.
Definition: index.c:519
options_bcj
lzma_options_bcj * options_bcj(const char *str)
Parser for BCJ options.
Definition: options.c:209
lzma_cputhreads
uint32_t lzma_cputhreads(void)
Get the number of processor cores or threads.
Definition: hardware_cputhreads.c:19
lzma_lzma_decoder_init
lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Allocates and initializes LZMA decoder.
Definition: lzma_decoder.c:987
index_cat_info::block_number_add
lzma_vli block_number_add
Same as above but for Block numbers.
Definition: index.c:728
message_filters_show
void message_filters_show(enum message_verbosity v, const lzma_filter *filters)
Print the filter chain.
Definition: message.c:1036
V_VERBOSE
@ V_VERBOSE
Errors, warnings, and verbose statistics.
Definition: message.h:18
lzma_delta_coder::distance
size_t distance
Delta distance.
Definition: delta_private.h:23
lzma_mf_is_supported
lzma_bool lzma_mf_is_supported(lzma_match_finder match_finder) lzma_nothrow lzma_attr_const
Test if given match finder is supported.
Definition: lz_encoder.c:586
index_stream::groups
index_tree groups
Definition: index.c:122
is_tty_stdin
bool is_tty_stdin(void)
Test if stdin is a terminal.
Definition: util.c:266
delta.h
Delta filter.
message_verbosity_get
enum message_verbosity message_verbosity_get(void)
Get the current verbosity level.
Definition: message.c:176
options_size
size_t options_size
Size of the filter-specific options structure.
Definition: filter_common.c:21
hardware_memlimit_set
void hardware_memlimit_set(uint64_t new_memlimit, bool set_compress, bool set_decompress, bool is_percentage)
Definition: hardware.c:62
lzma_index_decoder
lzma_ret lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Index decoder.
Definition: index_decoder.c:297
lzma_next_coder_s::memconfig
lzma_ret(* memconfig)(void *coder, uint64_t *memusage, uint64_t *old_memlimit, uint64_t new_memlimit)
Definition: common.h:168
lzma_index_iter::padding
lzma_vli padding
Size of Stream Padding after this Stream.
Definition: index.h:108
index_cat_info
Structure to pass info to index_cat_helper()
Definition: index.c:720
mf_ptr
static const uint8_t * mf_ptr(const lzma_mf *mf)
Get pointer to the first byte not ran through the match finder.
Definition: lz_encoder.h:221
worker_thread_s::coder
lzma_stream_coder * coder
Definition: stream_encoder_mt.c:69
lzma_next_coder_init
#define lzma_next_coder_init(func, next, allocator)
Definition: common.h:291
lzma_index_padding_size
uint32_t lzma_index_padding_size(const lzma_index *i)
Definition: index.c:593
lzma_lz_encoder::end
void(* end)(void *coder, const lzma_allocator *allocator)
Free allocated resources.
Definition: lz_encoder.h:202
str_to_uint64
uint64_t str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
Fancy version of strtoull()
Definition: util.c:58
lzma_cputhreads
uint32_t lzma_cputhreads(void) lzma_nothrow
Get the number of processor cores or threads.
Definition: hardware_cputhreads.c:19
lzma_raw_decoder
lzma_ret lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
Initialize raw decoder.
Definition: filter_decoder.c:149
message_version
void message_version(void) lzma_attribute((__noreturn__))
Prints the version number to stdout and exits with exit status SUCCESS.
Definition: message.c:1060
options_delta
lzma_options_delta * options_delta(const char *str)
Parser for Delta options.
Definition: options.c:165
header_skip
#define header_skip(is_bt, len_min)
Definition: lz_encoder_mf.c:214
move_pending
static void move_pending(lzma_mf *mf)
Definition: lz_encoder_mf.c:178
lzma_check_update
void lzma_check_update(lzma_check_state *check, lzma_check type, const uint8_t *buf, size_t size)
Update the check state.
Definition: check.c:117
flush_needed
bool flush_needed
True when flushing is needed due to expired timeout.
Definition: mytime.c:20
lzma_index_encoder
lzma_ret lzma_index_encoder(lzma_stream *strm, const lzma_index *i) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Index encoder.
Definition: index_encoder.c:210
lzma_length_encoder
Definition: lzma_encoder_private.h:40
lzma_check_update
void lzma_check_update(lzma_check_state *check, lzma_check type, const uint8_t *buf, size_t size)
Update the check state.
Definition: check.c:117
try_sparse
static bool try_sparse
If true, try to create sparse files when decompressing.
Definition: file_io.c:67
mf_avail
static uint32_t mf_avail(const lzma_mf *mf)
Get the number of bytes that haven't been ran through the match finder yet.
Definition: lz_encoder.h:229
lzma_attribute
static uint32_t lzma_attribute((__always_inline__)) lzma_memcmplen(const uint8_t *buf1
lzma_filter::options
void * options
Pointer to filter-specific options structure.
Definition: filter.h:63
lzma_range_encoder::count
size_t count
Number of symbols in the tables.
Definition: range_encoder.h:34
LOOP_INPUT_MAX
#define LOOP_INPUT_MAX
Definition: lzma_encoder.c:308
lzma_easy_decoder_memusage
uint64_t lzma_easy_decoder_memusage(uint32_t preset)
Calculate approximate decoder memory usage of a preset.
Definition: easy_decoder_memusage.c:17
mytime_get_flush_timeout
int mytime_get_flush_timeout(void)
Get the number of milliseconds until the next flush.
Definition: mytime.c:78
lzma_block_header_encode
lzma_ret lzma_block_header_encode(const lzma_block *block, uint8_t *out)
Encode Block Header.
Definition: block_header_encoder.c:74
lzma_next_filter_init
lzma_ret lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Definition: common.c:112
worker_thread_s::block_options
lzma_block block_options
Compression options for this Block.
Definition: stream_encoder_mt.c:86
message.h
Printing messages to stderr.
LZMA_MF_BT3
@ LZMA_MF_BT3
Binary Tree with 2- and 3-byte hashing.
Definition: lzma12.h:90
LZMA_PRESET_DEFAULT
#define LZMA_PRESET_DEFAULT
Default compression preset.
Definition: container.h:31
lzma_lzma1_decoder::symbol
uint32_t symbol
Definition: lzma_decoder.c:273
vli_ceil4
static lzma_vli vli_ceil4(lzma_vli vli)
Round the variable-length integer to the next multiple of four.
Definition: index.h:39
lzma_lzma1_encoder_s::reps
uint32_t reps[REPS]
The four most recent match distances.
Definition: lzma_encoder_private.h:80
lzma_filter_encoder::init
lzma_init_function init
Definition: filter_encoder.c:27
io_open_src_real
static bool io_open_src_real(file_pair *pair)
Opens the source file. Returns false on success, true on error.
Definition: file_io.c:500
LZMA_FILTER_LZMA2
#define LZMA_FILTER_LZMA2
LZMA2 Filter ID.
Definition: lzma12.h:40
lzma_index_memusage
uint64_t lzma_index_memusage(lzma_vli streams, lzma_vli blocks) lzma_nothrow
Calculate memory usage of lzma_index.
Definition: index.c:442
lzma_outq::bufs_used
uint32_t bufs_used
Number of buffers in use.
Definition: outqueue.h:55
lzma_sha256_update
void lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
Update the SHA-256 hash state.
Definition: sha256.c:142
lzma_dict::pos
size_t pos
Definition: lz_decoder.h:28
message_signal_handler
void message_signal_handler(void) lzma_attribute((__noreturn__))
Definition: message.c:782
lzma_memlimit_set
lzma_ret lzma_memlimit_set(lzma_stream *strm, uint64_t memlimit) lzma_nothrow
Set the memory usage limit.
Definition: common.c:428
xz_file_info::stream_padding
uint64_t stream_padding
Total amount of Stream Padding.
Definition: list.c:23
lzma_sha256_init
void lzma_sha256_init(lzma_check_state *check)
Prepare SHA-256 state for new input.
Definition: sha256.c:127
uint64_to_nicestr
const char * uint64_to_nicestr(uint64_t value, enum nicestr_unit unit_min, enum nicestr_unit unit_max, bool always_also_bytes, uint32_t slot)
Convert uint64_t to a nice human readable string.
Definition: util.c:177
signals_exit
void signals_exit(void)
Definition: signals.c:153
tuklib_progname.h
Program name to be displayed in messages.
lzma_index_buffer_encode
lzma_ret lzma_index_buffer_encode(const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call .xz Index encoder.
Definition: index_encoder.c:222
tuklib_integer.h
Various integer and bit operations.
lzma_index_buffer_encode
lzma_ret lzma_index_buffer_encode(const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Single-call .xz Index encoder.
Definition: index_encoder.c:222
lzma_sha256_state
State for the internal SHA-256 implementation.
Definition: check.h:41
lzma_crc32_table
const uint32_t lzma_crc32_table[8][256]
Definition: crc32_small.c:16
io_init
void io_init(void)
Initialize the I/O module.
Definition: file_io.c:95
rc_if_0
#define rc_if_0(prob, seq)
Definition: range_decoder.h:111
message_help
void message_help(bool long_help) lzma_attribute((__noreturn__))
Print the help message.
Definition: message.c:1077
opt_single_stream
bool opt_single_stream
If true, stop after decoding the first stream.
Definition: coder.c:27
lzma_dict::limit
size_t limit
Write limit.
Definition: lz_decoder.h:36
lzma_stream_header_decode
lzma_ret lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
Decode Stream Header.
Definition: stream_flags_decoder.c:31
bcj.h
Branch/Call/Jump conversion filters.
lzma_index_iter::number_in_file
lzma_vli number_in_file
Block number in the file.
Definition: index.h:122
lzma_index_coder::crc32
uint32_t crc32
CRC32 of the List of Records field.
Definition: index_decoder.c:52
lzma_range_encoder::pos
size_t pos
rc_encode()'s position in the tables
Definition: range_encoder.h:37
normalize
static void normalize(lzma_mf *mf)
Normalizes hash values.
Definition: lz_encoder_mf.c:108
lzma_internal_s::sequence
enum lzma_internal_s::@10 sequence
set_exit_no_warn
void set_exit_no_warn(void)
Definition: main.c:51
lzma_mf_s::offset
uint32_t offset
Definition: lz_encoder.h:58
my_log2
static uint32_t my_log2(uint32_t n)
Primitive base-2 logarithm for integers.
Definition: lzmainfo.c:91
lzma_stream_coder::ignore_check
bool ignore_check
Definition: stream_decoder.c:62
lzma_outbuf::unpadded_size
lzma_vli unpadded_size
Additional size information.
Definition: outqueue.h:25
lzma_stream_flags
Options for encoding/decoding Stream Header and Stream Footer.
Definition: stream_flags.h:33
LZMA2_HEADER_MAX
#define LZMA2_HEADER_MAX
Maximum size of LZMA2 headers.
Definition: lzma2_encoder.h:27
lzma_filter_coder::id
lzma_vli id
Filter ID.
Definition: filter_common.h:22
index_hash.h
Validate Index by using a hash function.
LZMA_FILTER_LZMA1
#define LZMA_FILTER_LZMA1
LZMA1 Filter ID.
Definition: lzma12.h:30
lzma_filter_flags_encode
lzma_ret lzma_filter_flags_encode(const lzma_filter *filter, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
Encode Filter Flags into given buffer.
Definition: filter_flags_encoder.c:31
lzma_filter_decoder_is_supported
lzma_bool lzma_filter_decoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const
Test if the given Filter ID is supported for decoding.
Definition: filter_decoder.c:133
lzma_outq_read
lzma_ret lzma_outq_read(lzma_outq *restrict outq, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_vli *restrict unpadded_size, lzma_vli *restrict uncompressed_size)
Read finished data.
Definition: outqueue.c:147
message_init
void message_init(void)
Initializes the message functions.
Definition: message.c:109
lzma_block_buffer_bound64
uint64_t lzma_block_buffer_bound64(uint64_t uncompressed_size)
Definition: block_buffer_encoder.c:56
lzma_mt::threads
uint32_t threads
Number of worker threads to use.
Definition: container.h:79
LZMA_OK
@ LZMA_OK
Operation completed successfully.
Definition: base.h:58
is_dir_sep
static bool is_dir_sep(char c)
Test if the char is a directory separator.
Definition: suffix.c:30
container.h
File formats.
lzma_code_function
lzma_ret(* lzma_code_function)(void *coder, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action)
Definition: common.h:105
suffix_get_dest_name
char * suffix_get_dest_name(const char *src_name)
Get the name of the destination file.
Definition: suffix.c:373
lzma_block_header_size
lzma_ret lzma_block_header_size(lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
Calculate Block Header Size.
Definition: block_header_encoder.c:18
lzma_get_progress
void lzma_get_progress(lzma_stream *strm, uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow
Get progress information.
Definition: common.c:366
memlimit_compress
static uint64_t memlimit_compress
Memory usage limit for compression.
Definition: hardware.c:21
lzma_physmem
uint64_t lzma_physmem(void) lzma_nothrow
Get the total amount of physical memory (RAM) in bytes.
Definition: hardware_physmem.c:19
lzma_stream::next_in
const uint8_t * next_in
Definition: base.h:486
worker_thread_s::block_encoder
lzma_next_coder block_encoder
Block encoder.
Definition: stream_encoder_mt.c:83
lzma_options_easy::opt_lzma
lzma_options_lzma opt_lzma
Options for LZMA2.
Definition: easy_preset.h:22
signals_block_count
static size_t signals_block_count
signals_block() and signals_unblock() can be called recursively.
Definition: signals.c:36
progress_pos
static void progress_pos(uint64_t *in_pos, uint64_t *compressed_pos, uint64_t *uncompressed_pos)
Get how much uncompressed and compressed data has been processed.
Definition: message.c:506
round_up_to_mib
uint64_t round_up_to_mib(uint64_t n)
Round an integer up to the next full MiB and convert to MiB.
Definition: util.c:139
lzma_delta_type
lzma_delta_type
Type of the delta calculation.
Definition: delta.h:35
lzma_filter_encoder::id
lzma_vli id
Filter ID.
Definition: filter_encoder.c:23
lzma_stream_encoder_mt
lzma_ret lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options)
Initialize multithreaded .xz Stream encoder.
Definition: stream_encoder_mt.c:1079
tuklib_exit.h
Close stdout and stderr, and exit.
delta_decoder.h
Delta filter decoder.
lzma_attribute
void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1) lzma_alloc_zero(size_t size
check.h
Internal API to different integrity check functions.
index_stream::record_count
lzma_vli record_count
Number of Records in this Stream.
Definition: index.c:125
lzma_mt::flags
uint32_t flags
Flags.
Definition: container.h:74
worker_error
static void worker_error(worker_thread *thr, lzma_ret ret)
Tell the main thread that something has gone wrong.
Definition: stream_encoder_mt.c:182
lzma_next_coder_s::update
lzma_ret(* update)(void *coder, const lzma_allocator *allocator, const lzma_filter *filters, const lzma_filter *reversed_filters)
Definition: common.h:173
lzma_lzma1_decoder::is_rep0
probability is_rep0[STATES]
Definition: lzma_decoder.c:186
lzma_lzma1_decoder::match_len_decoder
lzma_length_decoder match_len_decoder
Length of a normal match.
Definition: lzma_decoder.c:213
lzma_stream_coder::index_hash
lzma_index_hash * index_hash
Definition: stream_decoder.c:41
lzma_stream_buffer_decode
lzma_ret lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call .xz Stream decoder.
Definition: stream_buffer_decoder.c:17
xz_file_info::memusage_max
uint64_t memusage_max
Highest memory usage so far.
Definition: list.c:26
hardware.h
Hardware information.
lzma_raw_buffer_encode
lzma_ret lzma_raw_buffer_encode(const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Single-call raw encoder.
Definition: filter_buffer_encoder.c:17
lzma_lz_options::match_len_max
size_t match_len_max
Definition: lz_encoder.h:144
index_group::node
index_tree_node node
Every Record group is part of index_stream.groups tree.
Definition: index.c:73
worker_state
worker_state
Definition: stream_encoder_mt.c:26
lzma_index_iter::compressed_file_offset
lzma_vli compressed_file_offset
Compressed start offset of this Block.
Definition: index.h:132
lzma_properties_decode
lzma_ret lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *props, size_t props_size) lzma_nothrow
Decode the Filter Properties field.
Definition: filter_decoder.c:169
lzma_lzma_decoder_init
lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Allocates and initializes LZMA decoder.
Definition: lzma_decoder.c:987
lzma_index_hash_s::crc32
uint32_t crc32
CRC32 of the Index.
Definition: index_hash.c:68
lzma_block_uncomp_encode
lzma_ret lzma_block_uncomp_encode(lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
Single-call uncompressed .xz Block encoder.
Definition: block_buffer_encoder.c:329
lzma_internal_s::avail_in
size_t avail_in
Definition: common.h:217
lzma_lzma2_coder::need_properties
bool need_properties
Definition: lzma2_decoder.c:46
lzma_stream_buffer_encode
lzma_ret lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos_ptr, size_t out_size)
Single-call .xz Stream encoder.
Definition: stream_buffer_encoder.c:44
index_tree::count
uint32_t count
Number of nodes in the tree.
Definition: index.c:60
message_init
void message_init(void)
Initializes the message functions.
Definition: message.c:109
lzma_simple_coder::filter
size_t(* filter)(void *simple, uint32_t now_pos, bool is_encoder, uint8_t *buffer, size_t size)
Definition: simple_private.h:34
mf_skip
static void mf_skip(lzma_mf *mf, uint32_t amount)
Definition: lz_encoder.h:267
lzma_lz_decoder::set_uncompressed
void(* set_uncompressed)(void *coder, lzma_vli uncompressed_size)
Set the uncompressed size.
Definition: lz_decoder.h:66
lzma_block::version
uint32_t version
Block format version.
Definition: block.h:52
lzma_stream_coder_s::header
uint8_t header[LZMA_STREAM_HEADER_SIZE]
Buffer to hold Stream Header and Stream Footer.
Definition: stream_encoder_mt.c:127
lzma_lzma1_encoder_s::matches_count
uint32_t matches_count
Number of match candidates in matches[].
Definition: lzma_encoder_private.h:86
lzma_check_is_supported
lzma_bool lzma_check_is_supported(lzma_check type)
Test if the given Check ID is supported.
Definition: check.c:17
io_write_to_user_abort_pipe
void io_write_to_user_abort_pipe(void)
Write a byte to user_abort_pipe[1].
Definition: file_io.c:135
lzma_stream_decoder
lzma_ret lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
Initialize .xz Stream decoder.
Definition: stream_decoder.c:459
lzma_lzma2_coder::opt_cur
lzma_options_lzma opt_cur
LZMA options currently in use.
Definition: lzma2_encoder.c:33
file_pair::dest_try_sparse
bool dest_try_sparse
Definition: file_io.h:51
mf_position
static uint32_t mf_position(const lzma_mf *mf)
Definition: lz_encoder.h:252
lzma_stream_coder_s::index
lzma_index * index
Index to hold sizes of the Blocks.
Definition: stream_encoder_mt.c:117
lzma_stream_footer_encode
lzma_ret lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
Encode Stream Footer.
Definition: stream_flags_encoder.c:57
lzma_filter_encoder::props_encode
lzma_ret(* props_encode)(const void *options, uint8_t *out)
Definition: filter_encoder.c:51
lzma_next_coder_s::end
lzma_end_function end
Definition: common.h:155
lzma_lzma2_coder
Definition: lzma2_decoder.c:19
LZMA_CHECK_CRC32
@ LZMA_CHECK_CRC32
Definition: check.h:35
lzma_block_header_encode
lzma_ret lzma_block_header_encode(const lzma_block *block, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
Encode Block Header.
Definition: block_header_encoder.c:74
file_pair::src_st
struct stat src_st
Stat of the source file.
Definition: file_io.h:59
index_encoder.h
Encodes the Index field.
lzma_filter_info_s
Definition: common.h:120
lzma_index_stream_count
lzma_vli lzma_index_stream_count(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the number of Streams.
Definition: index.c:505
lzma_index_iter_init
void lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
Initialize an iterator.
Definition: index.c:1083
V_DEBUG
@ V_DEBUG
Very verbose.
Definition: message.h:19
lzma_lzma1_decoder::uncompressed_size
lzma_vli uncompressed_size
Definition: lzma_decoder.c:239
lz_encoder_hash.h
Hash macros for match finders.
mytime_set_flush_time
void mytime_set_flush_time(void)
Store the time of when compressor was flushed.
Definition: mytime.c:69
lzma_range_decoder
Definition: range_decoder.h:20
lzma_options_easy::filters
lzma_filter filters[LZMA_FILTERS_MAX+1]
Definition: easy_preset.h:19
dict_is_distance_valid
static bool dict_is_distance_valid(const lzma_dict *const dict, const size_t distance)
Validate the match distance.
Definition: lz_decoder.h:120
stdout_flags
static int stdout_flags
Definition: file_io.c:82
lzma_mf_is_supported
lzma_bool lzma_mf_is_supported(lzma_match_finder mf)
Test if given match finder is supported.
Definition: lz_encoder.c:586
lzma_rc_prices
const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE]
Lookup table for the inline functions defined in this file.
Definition: price_table.c:5
io_open_dest
bool io_open_dest(file_pair *pair)
Open the destination file.
Definition: file_io.c:987
LZMA_INDEX_ITER_ANY
@ LZMA_INDEX_ITER_ANY
Get the next Block or Stream.
Definition: index.h:227
index_stream::block_number_base
lzma_vli block_number_base
Total number of Blocks before this Stream.
Definition: index.c:115
lzma_next_coder_s::get_check
lzma_check(* get_check)(const void *coder)
Definition: common.h:164
io_pread
bool io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos)
Read from source file from given offset to a buffer.
Definition: file_io.c:1172
lzma_index_prealloc
void lzma_index_prealloc(lzma_index *i, lzma_vli records)
Definition: index.c:431
lzma_delta_coder::pos
uint8_t pos
Position in history[].
Definition: delta_private.h:26
options_delta
lzma_options_delta * options_delta(const char *str)
Parser for Delta options.
Definition: options.c:165
is_literal_state
#define is_literal_state(state)
Test if the previous state was a literal.
Definition: lzma_common.h:100
lzma_raw_encoder_memusage
uint64_t lzma_raw_encoder_memusage(const lzma_filter *filters) lzma_nothrow lzma_attr_pure
Calculate approximate memory requirements for raw encoder.
Definition: filter_encoder.c:222
BLOCK_SIZE_MAX
#define BLOCK_SIZE_MAX
Definition: stream_encoder_mt.c:23
io_read
size_t io_read(file_pair *pair, io_buf *buf_union, size_t size)
Reads from the source file to a buffer.
Definition: file_io.c:1112
block_header_info
Information about a .xz Block.
Definition: list.c:41
lzma_filter
Filter options.
Definition: filter.h:43
LZMA_VLI_MAX
#define LZMA_VLI_MAX
Maximum supported value of a variable-length integer.
Definition: vli.h:34
lzma_filters_copy
lzma_ret lzma_filters_copy(const lzma_filter *src, lzma_filter *dest, const lzma_allocator *allocator)
Copy the filters array.
Definition: filter_common.c:125
signals.h
Handling signals to abort operation.
lzma_outq_is_empty
static bool lzma_outq_is_empty(const lzma_outq *outq)
Test if the queue is completely empty.
Definition: outqueue.h:153
LZMA_FORMAT_ERROR
@ LZMA_FORMAT_ERROR
Memory usage limit was reached.
Definition: base.h:150
THR_EXIT
@ THR_EXIT
Definition: stream_encoder_mt.c:43
lzma_index_iter::uncompressed_file_offset
lzma_vli uncompressed_file_offset
Uncompressed start offset of this Block.
Definition: index.h:147
progress_strm
static lzma_stream * progress_strm
Pointer to lzma_stream used to do the encoding or decoding.
Definition: message.c:57
check.h
Integrity checks.
dict_put
static bool dict_put(lzma_dict *dict, uint8_t byte)
Definition: lz_decoder.h:187
LZMA_MF_HC4
@ LZMA_MF_HC4
Hash Chain with 2-, 3-, and 4-byte hashing.
Definition: lzma12.h:70
lzma_stream_header_encode
lzma_ret lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
Encode Stream Header.
Definition: stream_flags_encoder.c:30
lzma_block_buffer_decode
lzma_ret lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call .xz Block decoder.
Definition: block_buffer_decoder.c:17
xrealloc
void * xrealloc(void *ptr, size_t size) lzma_attribute((__malloc__)) lzma_attr_alloc_size(2)
Safe realloc() that never returns NULL.
Definition: util.c:25
LZMA_FILTER_RESERVED_START
#define LZMA_FILTER_RESERVED_START
Definition: common.h:67
LZMA_THREADS_MAX
#define LZMA_THREADS_MAX
Definition: common.h:56
lzma_mf_s::write_pos
uint32_t write_pos
Definition: lz_encoder.h:80
options_lzma
lzma_options_lzma * options_lzma(const char *str)
Parser for LZMA options.
Definition: options.c:317
lzma_alone_decoder
lzma_ret lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result
Initialize .lzma decoder (legacy file format)
Definition: alone_decoder.c:235
lzma_options_lzma::depth
uint32_t depth
Maximum search depth in the match finder.
Definition: lzma12.h:375
lzma_index_stream_flags
lzma_ret lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
Set the Stream Flags.
Definition: index.c:601
io_no_sparse
void io_no_sparse(void)
Disable creation of sparse files when decompressing.
Definition: file_io.c:151
index_tree_end
static void index_tree_end(index_tree *tree, const lzma_allocator *allocator, void(*free_func)(void *node, const lzma_allocator *allocator))
Definition: index.c:215
uint64_to_nicestr
const char * uint64_to_nicestr(uint64_t value, enum nicestr_unit unit_min, enum nicestr_unit unit_max, bool always_also_bytes, uint32_t slot)
Convert uint64_t to a nice human readable string.
Definition: util.c:177
file_pair::dest_pending_sparse
off_t dest_pending_sparse
Definition: file_io.h:56
lzma_stream_coder::first_stream
bool first_stream
Definition: stream_decoder.c:75
lzma_optimal
Definition: lzma_encoder_private.h:54
lzma_mode_is_supported
lzma_bool lzma_mode_is_supported(lzma_mode mode) lzma_nothrow lzma_attr_const
Test if given compression mode is supported.
Definition: lzma_encoder.c:674
lzma_block_buffer_encode
lzma_ret lzma_block_buffer_encode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result
Single-call .xz Block encoder.
Definition: block_buffer_encoder.c:319
lzma_mf_s
Definition: lz_encoder.h:29
index_group::last
size_t last
Index of the last Record in use.
Definition: index.c:82
lzma_mf_s::find
uint32_t(* find)(lzma_mf *mf, lzma_match *matches)
Definition: lz_encoder.h:92
lzma_index_init
lzma_index * lzma_index_init(const lzma_allocator *allocator) lzma_nothrow
Allocate and initialize a new lzma_index structure.
Definition: index.c:398
lzma_outq_get_buf
lzma_outbuf * lzma_outq_get_buf(lzma_outq *outq)
Get a new buffer.
Definition: outqueue.c:114
signals_are_initialized
static bool signals_are_initialized
Definition: signals.c:33
lzma_stream_encoder_mt_memusage
uint64_t lzma_stream_encoder_mt_memusage(const lzma_mt *options) lzma_nothrow lzma_attr_pure
Calculate approximate memory usage of multithreaded .xz encoder.
Definition: stream_encoder_mt.c:1097
args_info::files_file
FILE * files_file
Definition: args.h:26
lzma_index_dup
lzma_index * lzma_index_dup(const lzma_index *src, const lzma_allocator *allocator)
Duplicate lzma_index.
Definition: index.c:926
lzma.h
The public API of liblzma data compression library.
lzma_raw_decoder_memusage
uint64_t lzma_raw_decoder_memusage(const lzma_filter *filters)
Calculate approximate memory requirements for raw decoder.
Definition: filter_decoder.c:161
lzma_index_coder::uncompressed_size
lzma_vli uncompressed_size
The most recent Uncompressed Size field.
Definition: index_decoder.c:46
index_tree_locate
static void * index_tree_locate(const index_tree *tree, lzma_vli target)
Definition: index.c:315
dict_is_empty
static bool dict_is_empty(const lzma_dict *const dict)
Test if dictionary is empty.
Definition: lz_decoder.h:112
tuklib_common.h
Common definitions for tuklib modules.
lzma_filter_encoder::props_size_get
lzma_ret(* props_size_get)(uint32_t *size, const void *options)
Definition: filter_encoder.c:42
lzma_lzma1_decoder
Definition: lzma_decoder.c:170
header_find
#define header_find(is_bt, len_min)
Definition: lz_encoder_mf.c:207
lzma_index_iter::uncompressed_stream_offset
lzma_vli uncompressed_stream_offset
Uncompressed start offset of this Block.
Definition: index.h:170
message_progress_start
void message_progress_start(lzma_stream *strm, uint64_t in_size)
Start progress info handling.
Definition: message.c:244
lzma_stream_buffer_bound
size_t lzma_stream_buffer_bound(size_t uncompressed_size)
Calculate output buffer size for single-call Stream encoder.
Definition: stream_buffer_encoder.c:26
LZMA_ACTION_MAX
#define LZMA_ACTION_MAX
Largest valid lzma_action value as unsigned integer.
Definition: common.h:81
message_progress_end
void message_progress_end(bool finished)
Finishes the progress message if we were in verbose mode.
Definition: message.c:693
lzma_alone_coder::memlimit
uint64_t memlimit
Memory usage limit.
Definition: alone_decoder.c:41
lzma_auto_coder
Definition: auto_decoder.c:17
lzma_simple_coder::now_pos
uint32_t now_pos
Definition: simple_private.h:44
LZMA_MF_HC3
@ LZMA_MF_HC3
Hash Chain with 2- and 3-byte hashing.
Definition: lzma12.h:59
io_copy_attrs
static void io_copy_attrs(const file_pair *pair)
Copies owner/group and permissions.
Definition: file_io.c:351
memlimit_decompress
static uint64_t memlimit_decompress
Memory usage limit for decompression.
Definition: hardware.c:24
coder_set_extreme
void coder_set_extreme(void)
Enable extreme mode.
Definition: coder.c:98
opt_flush_timeout
uint64_t opt_flush_timeout
Number of milliseconds to between LZMA_SYNC_FLUSHes.
Definition: mytime.c:19
rc_is_finished
#define rc_is_finished(range_decoder)
Definition: range_decoder.h:80
lzma_index_iter_locate
lzma_bool lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target) lzma_nothrow
Locate a Block.
Definition: index.c:1210
opt_format
enum format_type opt_format
Definition: coder.c:25
lzma_index_stream_size
lzma_vli lzma_index_stream_size(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the total size of the Stream.
Definition: index.c:526
get_check_names
static void get_check_names(char buf[CHECKS_STR_SIZE], uint32_t checks, bool space_after_comma)
Get a comma-separated list of Check names.
Definition: list.c:638
mytime_get_elapsed
uint64_t mytime_get_elapsed(void)
Get the number of milliseconds since the operation started.
Definition: mytime.c:62
io_close_src
static void io_close_src(file_pair *pair, bool success)
Closes source file of the file_pair structure.
Definition: file_io.c:779
lzma_index_stream_count
lzma_vli lzma_index_stream_count(const lzma_index *i)
Get the number of Streams.
Definition: index.c:505
xstrdup
char * xstrdup(const char *src)
Safe strdup() that never returns NULL.
Definition: util.c:48
update_long_rep
#define update_long_rep(state)
Indicate that the latest state was a long repeated match.
Definition: lzma_common.h:92
UNPADDED_SIZE_MIN
#define UNPADDED_SIZE_MIN
Minimum Unpadded Size.
Definition: index.h:20
progress_remaining
static const char * progress_remaining(uint64_t in_pos, uint64_t elapsed)
Definition: message.c:420
lzma_easy_preset
bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset)
Definition: easy_preset.c:17
lzma_stream::avail_in
size_t avail_in
Definition: base.h:487
lzma_vli_size
uint32_t lzma_vli_size(lzma_vli vli) lzma_nothrow lzma_attr_pure
Get the number of bytes required to encode a VLI.
Definition: vli_size.c:17
lzma_filter::id
lzma_vli id
Filter ID.
Definition: filter.h:54
alone_decoder.h
Decoder for LZMA_Alone files.
lzma_lzma2_coder::buf
uint8_t buf[LZMA2_HEADER_MAX+LZMA2_CHUNK_MAX]
Buffer to hold the chunk header and LZMA compressed data.
Definition: lzma2_encoder.c:50
lzma_index_end
void lzma_index_end(lzma_index *i, const lzma_allocator *allocator) lzma_nothrow
Deallocate lzma_index.
Definition: index.c:417
lzma_decoder.h
LZMA decoder API.
lzma_index_hash_s::records
lzma_index_hash_info records
Information collected from the Index field.
Definition: index_hash.c:52
progress_time
static const char * progress_time(uint64_t mseconds)
Definition: message.c:387
lzma_outq_end
void lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator)
Free the memory associated with the output queue.
Definition: outqueue.c:101
encode_in_place
static void encode_in_place(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
Definition: delta_encoder.c:38
LZMA_FILTER_SPARC
#define LZMA_FILTER_SPARC
Definition: bcj.h:47
display_errors
static unsigned int display_errors
Definition: xzdec.c:40
lzma_block_unpadded_size
lzma_vli lzma_block_unpadded_size(const lzma_block *block) lzma_nothrow lzma_attr_pure
Calculate Unpadded Size.
Definition: block_util.c:46
lzma_outq
Definition: outqueue.h:37
str_to_uint64
uint64_t str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
Fancy version of strtoull()
Definition: util.c:58
rc_read_init
static lzma_ret rc_read_init(lzma_range_decoder *rc, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size)
Reads the first five bytes to initialize the range decoder.
Definition: range_decoder.h:29
LZMA_FILTER_ARMTHUMB
#define LZMA_FILTER_ARMTHUMB
Definition: bcj.h:42
lzma_index_iter_mode
lzma_index_iter_mode
Operation mode for lzma_index_iter_next()
Definition: index.h:226
lzma_allocator
Custom functions for memory handling.
Definition: base.h:372
lzma_outbuf
Output buffer for a single thread.
Definition: outqueue.h:17
lzma_crc32
uint32_t lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc) lzma_nothrow lzma_attr_pure
Calculate CRC32.
Definition: crc32_fast.c:27
changes_size
bool changes_size
Definition: filter_common.c:34
lzma_get_check
lzma_check lzma_get_check(const lzma_stream *strm) lzma_nothrow
Get the type of the integrity check.
Definition: common.c:382
lzma_next_end
void lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)
Definition: common.c:141
coder_init
static enum coder_init_ret coder_init(file_pair *pair)
Definition: coder.c:435
lzma_filter_flags_size
lzma_ret lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
Calculate encoded size of a Filter Flags field.
Definition: filter_flags_encoder.c:17
index_tree_node_s::compressed_base
lzma_vli compressed_base
Compressed start offset of this Stream or Block.
Definition: index.c:37
lzma_mf_find
uint32_t lzma_mf_find(lzma_mf *mf, uint32_t *count, lzma_match *matches)
Find matches starting from the current byte.
Definition: lz_encoder_mf.c:23
mytime_now
static uint64_t mytime_now(void)
Get the current time as milliseconds.
Definition: mytime.c:30
lzma_stream_coder_s::filters
lzma_filter filters[LZMA_FILTERS_MAX+1]
The filter chain currently in use.
Definition: stream_encoder_mt.c:113
lzma_stream_coder_s::progress_in
uint64_t progress_in
Definition: stream_encoder_mt.c:168
progress_next_update
static uint64_t progress_next_update
Elapsed time when the next progress message update should be done.
Definition: message.c:103
filename
static const char * filename
Filename which we will print with the verbose messages.
Definition: message.c:28
lzma_stream_coder::memlimit
uint64_t memlimit
Memory usage limit.
Definition: stream_decoder.c:44
LITERAL_CODERS_MAX
#define LITERAL_CODERS_MAX
Maximum number of literal coders.
Definition: lzma_common.h:118
lzma_block::filters
lzma_filter * filters
Array of filters.
Definition: block.h:200
coder_normal
static bool coder_normal(file_pair *pair)
Compress or decompress using liblzma.
Definition: coder.c:617
lzma_index_stream_padding
lzma_ret lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
Set the amount of Stream Padding.
Definition: index.c:618
file_io.h
I/O types and functions.
lzma_common.h
Private definitions common to LZMA encoder and decoder.
lzma_index_hash_s::pos
size_t pos
Definition: index_hash.c:65
lzma_stream_coder::tell_unsupported_check
bool tell_unsupported_check
Definition: stream_decoder.c:55
lzma_options_lzma::preset_dict_size
uint32_t preset_dict_size
Size of the preset dictionary.
Definition: lzma12.h:254
lzma_next_coder_s
Hold data and function pointers of the next filter in the chain.
Definition: common.h:135
index_stream::node
index_tree_node node
Every index_stream is a node in the tree of Sreams.
Definition: index.c:109
lzma_lzma1_decoder::pos_special
probability pos_special[FULL_DISTANCES - DIST_MODEL_END]
Definition: lzma_decoder.c:206
user_abort_pipe
static int user_abort_pipe[2]
Definition: file_io.c:87
lzma_stream_flags_compare
lzma_ret lzma_stream_flags_compare(const lzma_stream_flags *a, const lzma_stream_flags *b)
Compare two lzma_stream_flags structures.
Definition: stream_flags_common.c:21
lzma_outq::buf_size_max
size_t buf_size_max
Amount of buffer space available in each buffer.
Definition: outqueue.h:45
file_pair::src_name
const char * src_name
Definition: file_io.h:34
opt_format
enum format_type opt_format
Definition: coder.c:25
files_pos
static unsigned int files_pos
Number of the current file.
Definition: message.c:19
lzma_raw_decoder
lzma_ret lzma_raw_decoder(lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result
Initialize raw decoder.
Definition: filter_decoder.c:149
LZMA_UNSUPPORTED_CHECK
@ LZMA_UNSUPPORTED_CHECK
Cannot calculate the integrity check.
Definition: base.h:90
name_id_map
Definition: options.c:20
lzma_reserved_enum
lzma_reserved_enum
Type of reserved enumeration variable in structures.
Definition: base.h:44
message_try_help
void message_try_help(void)
Print a message that user should try –help.
Definition: message.c:1049
lzma_properties_encode
lzma_ret lzma_properties_encode(const lzma_filter *filter, uint8_t *props) lzma_nothrow
Encode the Filter Properties field.
Definition: filter_encoder.c:276
lzma_stream_coder::block_decoder
lzma_next_coder block_decoder
Definition: stream_decoder.c:30
uint32_to_optstr
static const char * uint32_to_optstr(uint32_t num)
Convert uint32_t to a nice string for –lzma[12]=dict=SIZE.
Definition: message.c:887
V_WARNING
@ V_WARNING
Errors and warnings.
Definition: message.h:17
coder_add_filter
void coder_add_filter(lzma_vli id, void *options)
Add a filter to the custom filter chain.
Definition: coder.c:107
LITERAL_CODER_SIZE
#define LITERAL_CODER_SIZE
Definition: lzma_common.h:115
lzma_index_iter_init
void lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i) lzma_nothrow
Initialize an iterator.
Definition: index.c:1083
opt_block_list
uint64_t * opt_block_list
Definition: coder.c:29
lzma_next_coder_s::get_progress
void(* get_progress)(void *coder, uint64_t *progress_in, uint64_t *progress_out)
Definition: common.h:159
index_stream::stream_padding
lzma_vli stream_padding
Definition: index.c:140
simple_coder.h
Wrapper for simple filters.
suffix_set
void suffix_set(const char *suffix)
Set a custom filename suffix.
Definition: suffix.c:388
message_verbosity
message_verbosity
Verbosity levels.
Definition: message.h:14
lzma_index_coder::index_ptr
lzma_index ** index_ptr
Definition: index_decoder.c:37
LZMA_MEM_ERROR
@ LZMA_MEM_ERROR
Cannot allocate memory.
Definition: base.h:128
lzma_match
Definition: lz_encoder.h:22
LZMA_TIMED_OUT
#define LZMA_TIMED_OUT
Definition: common.h:88
lzma_index_hash_end
void lzma_index_hash_end(lzma_index_hash *index_hash, const lzma_allocator *allocator)
Deallocate lzma_index_hash structure.
Definition: index_hash.c:105
lzma_index_block_count
lzma_vli lzma_index_block_count(const lzma_index *i)
Get the number of Blocks.
Definition: index.c:498
LZMA_CHECK_SHA256
@ LZMA_CHECK_SHA256
Definition: check.h:49
lzma_lzma1_decoder::probs
probability * probs
Base of the current probability tree.
Definition: lzma_decoder.c:269
common.h
Common functions needed in many places in liblzma.
lzma_stream_encoder
lzma_ret lzma_stream_encoder(lzma_stream *strm, const lzma_filter *filters, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Stream encoder using a custom filter chain.
Definition: stream_encoder.c:328
lzma_stream_coder::buffer_pos
size_t buffer_pos
Read position in buffer[].
Definition: stream_encoder.c:50
lzma_stream_coder_s::thr
worker_thread * thr
Definition: stream_encoder_mt.c:163
lzma_sha256_update
void lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
Update the SHA-256 hash state.
Definition: sha256.c:142
lzma_lzma1_decoder::literal
probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE]
Literals; see comments in lzma_common.h.
Definition: lzma_decoder.c:176
lzma_stream_coder::index_encoder
lzma_next_coder index_encoder
Definition: stream_encoder.c:44
lzma_vli_encode
lzma_ret lzma_vli_encode(lzma_vli vli, size_t *vli_pos, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Encode a variable-length integer.
lzma_outbuf::buf
uint8_t * buf
Pointer to the output buffer of lzma_outq.buf_size_max bytes.
Definition: outqueue.h:19
uint64_to_str
const char * uint64_to_str(uint64_t value, uint32_t slot)
Convert uint64_t to a string.
Definition: util.c:161
lzma_ret
lzma_ret
Return values used by several functions in liblzma.
Definition: base.h:57
mytime_set_start_time
void mytime_set_start_time(void)
Store the time when (de)compression was started.
Definition: mytime.c:52
lzma_raw_encoder
lzma_ret lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
Initialize raw encoder.
Definition: filter_encoder.c:208
lzma_block_buffer_encode
lzma_ret lzma_block_buffer_encode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call .xz Block encoder.
Definition: block_buffer_encoder.c:319
tuklib_gettext.h
Wrapper for gettext and friends.
message_bug
void message_bug(void)
Definition: message.c:775
THR_IDLE
@ THR_IDLE
Waiting for work.
Definition: stream_encoder_mt.c:28
LZMA_SUPPORTED_FLAGS
#define LZMA_SUPPORTED_FLAGS
Definition: common.h:72
lzma_bufcpy
size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size)
Definition: common.c:94
lzma_block_buffer_bound64
uint64_t lzma_block_buffer_bound64(uint64_t uncompressed_size)
Definition: block_buffer_encoder.c:56
hardware_threads_set
void hardware_threads_set(uint32_t n)
Set the maximum number of worker threads.
Definition: hardware.c:31
lzma_lzma2_coder::uncompressed_size
size_t uncompressed_size
Uncompressed size of LZMA chunk.
Definition: lzma2_decoder.c:38
lzma_internal_s::allow_buf_error
bool allow_buf_error
Definition: common.h:224
lzma_index_iter::number
lzma_vli number
Stream number in the lzma_index.
Definition: index.h:62
lzma_check_finish
void lzma_check_finish(lzma_check_state *check, lzma_check type)
Finish the check calculation and store the result to check->buffer.u8.
Definition: check.c:148
lzma_filter_info_s::options
void * options
Pointer to filter's options structure.
Definition: common.h:130
lzma_check_finish
void lzma_check_finish(lzma_check_state *check, lzma_check type)
Finish the check calculation and store the result to check->buffer.u8.
Definition: check.c:148
index_tree::leftmost
index_tree_node * leftmost
Definition: index.c:53
main.h
Miscellaneous declarations.
lzma_block_encoder
lzma_ret lzma_block_encoder(lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result
Initialize .xz Block encoder.
Definition: block_encoder.c:215
index_group::allocated
size_t allocated
Number of Records that can be put in records[].
Definition: index.c:79
rc_from_local
#define rc_from_local(range_decoder, in_pos)
Stores the local copes back to the range decoder structure.
Definition: range_decoder.h:61
update_literal
#define update_literal(state)
Indicate that the latest state was a literal.
Definition: lzma_common.h:80
lzma_index_file_size
lzma_vli lzma_index_file_size(const lzma_index *i)
Get the total size of the file.
Definition: index.c:560
move_window
static void move_window(lzma_mf *mf)
Moves the data in the input window to free space for new data.
Definition: lz_encoder.c:46
lzma_filter_decoder
Definition: filter_decoder.c:21
lzma_stream_coder::block_options
lzma_block block_options
Options for the Block encoder.
Definition: stream_decoder.c:34
strm
static lzma_stream strm
Stream used to communicate with liblzma.
Definition: coder.c:33
in_buf
static io_buf in_buf
Input and output buffers.
Definition: coder.c:39
lzma_stream_coder::memusage
uint64_t memusage
Amount of memory actually needed (only an estimate)
Definition: stream_decoder.c:47
lzma_mf_s::read_ahead
uint32_t read_ahead
Definition: lz_encoder.h:67
lzma_index_hash_init
lzma_index_hash * lzma_index_hash_init(lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
Allocate and initialize a new lzma_index_hash structure.
Definition: index_hash.c:73
lzma_index_hash_end
void lzma_index_hash_end(lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow
Deallocate lzma_index_hash structure.
Definition: index_hash.c:105
set_exit_status
void set_exit_status(enum exit_status_type new_status)
Definition: main.c:31
lzma12.h
LZMA1 and LZMA2 filters.
suffix.h
Checks filename suffix and creates the destination filename.
lzma_outq::bufs_pos
uint32_t bufs_pos
Definition: outqueue.h:52
LZMA_TELL_NO_CHECK
#define LZMA_TELL_NO_CHECK
Definition: container.h:457
lzma_index_encoder
lzma_ret lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
Initialize .xz Index encoder.
Definition: index_encoder.c:210
get_options
static lzma_ret get_options(const lzma_mt *options, lzma_options_easy *opt_easy, const lzma_filter **filters, uint64_t *block_size, uint64_t *outbuf_size_max)
Definition: stream_encoder_mt.c:866
lzma_index_coder::index
const lzma_index * index
Index being encoded.
Definition: index_encoder.c:30
round_up_to_mib
uint64_t round_up_to_mib(uint64_t n)
Round an integer up to the next full MiB and convert to MiB.
Definition: util.c:139
lzma_outq::bufs_allocated
uint32_t bufs_allocated
Number of buffers allocated.
Definition: outqueue.h:48
private.h
Common includes, definions, and prototypes.
msg_suffix
static void msg_suffix(const char *src_name, const char *suffix)
Definition: suffix.c:183
lzma_bool
unsigned char lzma_bool
Boolean.
Definition: base.h:29
index_cat_info::file_size
lzma_vli file_size
Compressed file size of the destination.
Definition: index.c:725
lzma_index_iter::unpadded_size
lzma_vli unpadded_size
Unpadded size of this Block.
Definition: index.h:188
lzma_lz_decoder
Definition: lz_decoder.h:54
HEADERS_BOUND
#define HEADERS_BOUND
Definition: block_buffer_encoder.c:28
lzma_index_stream_flags
lzma_ret lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags) lzma_nothrow lzma_attr_warn_unused_result
Set the Stream Flags.
Definition: index.c:601
no_warn
static bool no_warn
Definition: main.c:27
lzma_init_function
lzma_ret(* lzma_init_function)(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_filter_info *filters)
Type of a function used to initialize a filter encoder or decoder.
Definition: common.h:97
lzma_mt::timeout
uint32_t timeout
Timeout to allow lzma_code() to return early.
Definition: container.h:135
lzma_properties_encode
lzma_ret lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
Encode the Filter Properties field.
Definition: filter_encoder.c:276
message_progress_start
void message_progress_start(lzma_stream *strm, uint64_t in_size)
Start progress info handling.
Definition: message.c:244
LZMA_OPTIONS_ERROR
@ LZMA_OPTIONS_ERROR
Invalid or unsupported options.
Definition: base.h:160
lzma_vli
uint64_t lzma_vli
Variable-length integer type.
Definition: vli.h:63
lzma_coder::mf
lzma_mf mf
History buffer and match finder.
Definition: lz_encoder.c:31
lzma_stream_coder::concatenated
bool concatenated
Definition: stream_decoder.c:69
LZMA_PRESET_LEVEL_MASK
#define LZMA_PRESET_LEVEL_MASK
Mask for preset level.
Definition: container.h:40
lzma_stream
Passing data to and from liblzma.
Definition: base.h:485
lzma_stream_flags::version
uint32_t version
Stream Flags format version.
Definition: stream_flags.h:51
lzma2_encoder.h
LZMA2 encoder.
lzma_coder::this_finished
bool this_finished
Definition: lz_decoder.c:40
uint64_to_str
const char * uint64_to_str(uint64_t value, uint32_t slot)
Convert uint64_t to a string.
Definition: util.c:161
io_write
bool io_write(file_pair *pair, const io_buf *buf, size_t size)
Writes a buffer to the destination file.
Definition: file_io.c:1261
lzma_index
struct lzma_index_s lzma_index
Opaque data type to hold the Index(es) and other information.
Definition: index.h:37
args_info::arg_count
unsigned int arg_count
Number of filenames from command line.
Definition: args.h:18
worker_thread_s::outbuf
lzma_outbuf * outbuf
Definition: stream_encoder_mt.c:65
lzma_lzma_state
lzma_lzma_state
Definition: lzma_common.h:56
expected_in_size
static uint64_t expected_in_size
Definition: message.c:61
signals_init
void signals_init(void)
Definition: signals.c:54
lzma2_decoder.h
LZMA2 decoder.
lzma_check_state
Structure to hold internal state of the check being calculated.
Definition: check.h:81
lzma_simple_coder::is_encoder
bool is_encoder
Definition: simple_private.h:30
LZMA_VLI_UNKNOWN
#define LZMA_VLI_UNKNOWN
VLI value to denote that the value is unknown.
Definition: vli.h:39
dict_get
static uint8_t dict_get(const lzma_dict *const dict, const uint32_t distance)
Get a byte from the history buffer.
Definition: lz_decoder.h:103
has_dir_sep
static bool has_dir_sep(const char *str)
Test if the string contains a directory separator.
Definition: suffix.c:42
io_write_to_user_abort_pipe
void io_write_to_user_abort_pipe(void)
Write a byte to user_abort_pipe[1].
Definition: file_io.c:135
lzma_internal_s::supported_actions
bool supported_actions[LZMA_ACTION_MAX+1]
Indicates which lzma_action values are allowed by next.code.
Definition: common.h:220
parse_block_header
static bool parse_block_header(file_pair *pair, const lzma_index_iter *iter, block_header_info *bhi, xz_file_info *xfi)
Parse the Block Header.
Definition: list.c:406
lzma_index_s::streams
index_tree streams
Definition: index.c:149
lzma_range_encoder
Definition: range_encoder.h:27
is_tty_stdout
bool is_tty_stdout(void)
Test if stdout is a terminal.
Definition: util.c:279
message_bug
void message_bug(void) lzma_attribute((__noreturn__))
Definition: message.c:775
signals_unblock
void signals_unblock(void)
Unblock the signals blocked by signals_block().
Definition: signals.c:135
lzma_index_memused
uint64_t lzma_index_memused(const lzma_index *i)
Calculate the memory usage of an existing lzma_index.
Definition: index.c:491
lzma_auto_coder::next
lzma_next_coder next
Stream decoder or LZMA_Alone decoder.
Definition: auto_decoder.c:19
LZMA_CHECK_CRC64
@ LZMA_CHECK_CRC64
Definition: check.h:42
lzma_block_compressed_size
lzma_ret lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size) lzma_nothrow lzma_attr_warn_unused_result
Validate and set Compressed Size according to Unpadded Size.
Definition: block_util.c:18
lzma_stream::total_in
uint64_t total_in
Definition: base.h:488
message_verbosity_decrease
void message_verbosity_decrease(void)
Decrease verbosity level by one step unless it was at minimum.
Definition: message.c:166
update_short_rep
#define update_short_rep(state)
Indicate that the latest state was a short match.
Definition: lzma_common.h:96
lzma_lzma_preset
lzma_bool lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset) lzma_nothrow
Set a compression preset to lzma_options_lzma structure.
Definition: lzma_encoder_presets.c:18
lzma_stream_encoder
lzma_ret lzma_stream_encoder(lzma_stream *strm, const lzma_filter *filters, lzma_check check)
Initialize .xz Stream encoder using a custom filter chain.
Definition: stream_encoder.c:328
lzma_outbuf::finished
bool finished
Definition: outqueue.h:32
opt_auto_adjust
bool opt_auto_adjust
Definition: coder.c:26
probability
uint16_t probability
Type of probabilities used with range coder.
Definition: range_common.h:69
LZMA_SYNC_FLUSH
@ LZMA_SYNC_FLUSH
Make all the input available at output.
Definition: base.h:265
lzma_outq_end
void lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator)
Free the memory associated with the output queue.
Definition: outqueue.c:101
is_empty_filename
void bool is_empty_filename(const char *filename)
Check if filename is empty and print an error message.
Definition: util.c:254
lzma_stream_coder::block_encoder
lzma_next_coder block_encoder
Block.
Definition: stream_encoder.c:33
lzma_stream_coder_s::thread_error
lzma_ret thread_error
Error code from a worker thread.
Definition: stream_encoder_mt.c:143
lzma_options_lzma::mode
lzma_mode mode
Definition: lzma12.h:322
LZMA_STREAM_FLAGS_SIZE
#define LZMA_STREAM_FLAGS_SIZE
Size of the Stream Flags field.
Definition: stream_flags_common.h:19
lzma_block_coder::compressed_size
lzma_vli compressed_size
Compressed Size calculated while decoding.
Definition: block_decoder.c:33
worker_thread_s
Definition: stream_encoder_mt.c:50
index_size
static lzma_vli index_size(lzma_vli count, lzma_vli index_list_size)
Calculate the size of the Index field including Index Padding.
Definition: index.h:57
lzma_filter_decoder_is_supported
lzma_bool lzma_filter_decoder_is_supported(lzma_vli id)
Test if the given Filter ID is supported for decoding.
Definition: filter_decoder.c:133
COMPRESSED_SIZE_MAX
#define COMPRESSED_SIZE_MAX
Biggest Compressed Size value that the Block encoder supports.
Definition: block_encoder.h:40
lzma_easy_encoder
lzma_ret lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
Initialize .xz Stream encoder using a preset number.
Definition: easy_encoder.c:17
lzma_block_buffer_bound
size_t lzma_block_buffer_bound(size_t uncompressed_size) lzma_nothrow
Calculate maximum output size for single-call Block encoding.
Definition: block_buffer_encoder.c:74
lzma_sha256_finish
void lzma_sha256_finish(lzma_check_state *check)
Finish the SHA-256 calculation and store the result to check->buffer.u8.
Definition: sha256.c:169
LZMA_VERSION
#define LZMA_VERSION
Compile-time version number.
Definition: version.h:57
lzma_index_append
lzma_ret lzma_index_append(lzma_index *i, const lzma_allocator *allocator, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result
Add a new Block to lzma_index.
Definition: index.c:640
lzma_alone_decoder
lzma_ret lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
Initialize .lzma decoder (legacy file format)
Definition: alone_decoder.c:235
price.h
Probability price calculation.
id
lzma_vli id
Filter ID.
Definition: filter_common.c:18
lzma_encoder_private.h
Private definitions for LZMA encoder.
lzma_lzma1_decoder::rep1
uint32_t rep1
Distance of second latest match.
Definition: lzma_decoder.c:229
coder_run
void coder_run(const char *filename)
Compress or decompress the given file.
Definition: coder.c:863
list_totals
void list_totals(void)
Show the totals after all files have been listed.
Definition: list.c:1121
signals_init
void signals_init(void)
Definition: signals.c:54
message_error
void void void message_error(const char *fmt,...) lzma_attribute((__format__(__printf__
Prints an error message and sets exit status.
lzma_index_buffer_decode
lzma_ret lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size)
Single-call .xz Index decoder.
Definition: index_decoder.c:309
lzma_lzma2_coder::lzma
void * lzma
LZMA encoder.
Definition: lzma2_encoder.c:30
io_close
void io_close(file_pair *pair, bool success)
Closes the file descriptors and frees possible allocated memory.
Definition: file_io.c:1048
fill_window
static lzma_ret fill_window(lzma_coder *coder, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, lzma_action action)
Tries to fill the input window (mf->buffer)
Definition: lz_encoder.c:81
outqueue.h
Output queue handling in multithreaded coding.
hardware_memlimit_show
void hardware_memlimit_show(void)
Display the amount of RAM and memory usage limits and exit.
Definition: hardware.c:118
LZMA_CHECK_ID_MAX
#define LZMA_CHECK_ID_MAX
Maximum valid Check ID.
Definition: check.h:68
coder_free
void coder_free(void)
Free the memory allocated for the coder and kill the worker threads.
Definition: coder.c:931
lzma_lzma1_decoder::is_match
probability is_match[STATES][POS_STATES_MAX]
If 1, it's a match. Otherwise it's a single 8-bit literal.
Definition: lzma_decoder.c:179
INDEX_GROUP_SIZE
#define INDEX_GROUP_SIZE
How many Records to allocate at once.
Definition: index.c:21
lzma_simple_coder::buffer
uint8_t buffer[]
Temporary buffer.
Definition: simple_private.h:62
file_pair::src_fd
int src_fd
File descriptor of the source file.
Definition: file_io.h:41
parse_memlimit
static void parse_memlimit(const char *name, const char *name_percentage, char *str, bool set_compress, bool set_decompress)
Parse and set the memory usage limit for compression and/or decompression.
Definition: args.c:34
lzma_index_s::uncompressed_size
lzma_vli uncompressed_size
Uncompressed size of all the Blocks in the Stream(s)
Definition: index.c:152
block_buffer_encoder.h
Single-call .xz Block encoder.
hardware_init
void hardware_init(void)
Definition: hardware.c:139
message_verbosity_decrease
void message_verbosity_decrease(void)
Decrease verbosity level by one step unless it was at minimum.
Definition: message.c:166
lzma_dict
Definition: lz_decoder.h:20
lzma_index_hash_info::count
lzma_vli count
Number of Records.
Definition: index_hash.c:26
lzma_index_hash_info::check
lzma_check_state check
Check calculated from Unpadded Sizes and Uncompressed Sizes.
Definition: index_hash.c:32
lzma_index_hash_s::uncompressed_size
lzma_vli uncompressed_size
Uncompressed Size currently being read from an Index Record.
Definition: index_hash.c:61
index.h
Handling of .xz Index and related information.
lzma_code
lzma_ret lzma_code(lzma_stream *strm, lzma_action action) lzma_nothrow lzma_attr_warn_unused_result
Encode or decode data.
Definition: common.c:193
lzma_block::raw_check
uint8_t raw_check[LZMA_CHECK_SIZE_MAX]
Raw value stored in the Check field.
Definition: block.h:217
lzma_easy_encoder_memusage
uint64_t lzma_easy_encoder_memusage(uint32_t preset)
Calculate approximate memory usage of easy encoder.
Definition: easy_encoder_memusage.c:17
current_filename_printed
static bool current_filename_printed
Definition: message.c:41
filters
static lzma_filter filters[LZMA_FILTERS_MAX+1]
Filters needed for all encoding all formats, and also decoding in raw data.
Definition: coder.c:36
LZMA_VLI_C
#define LZMA_VLI_C(n)
VLI constant suffix.
Definition: vli.h:49
opt_mode
enum operation_mode opt_mode
Definition: coder.c:24
lzma_filter_coder
Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
Definition: filter_common.h:20
lzma_outq::read_pos
size_t read_pos
Position in the buffer in lzma_outq_read()
Definition: outqueue.h:58
lzma_mf_find
uint32_t lzma_mf_find(lzma_mf *mf, uint32_t *count_ptr, lzma_match *matches)
Find matches starting from the current byte.
Definition: lz_encoder_mf.c:23
total_ram
static uint64_t total_ram
Total amount of physical RAM.
Definition: hardware.c:27
message_signal_handler
void message_signal_handler(void)
Definition: message.c:782
lzma_mf_s::match_len_max
uint32_t match_len_max
Definition: lz_encoder.h:114
mytime_get_flush_timeout
int mytime_get_flush_timeout(void)
Get the number of milliseconds until the next flush.
Definition: mytime.c:78
lzma_lzma1_decoder::len
uint32_t len
Definition: lzma_decoder.c:285
delta_private.h
Private common stuff for Delta encoder and decoder.
lzma_outq_has_buf
static bool lzma_outq_has_buf(const lzma_outq *outq)
Test if there is at least one buffer free.
Definition: outqueue.h:145
easy_preset.h
Preset handling for easy encoder and decoder.
lzma_mf_s::read_pos
uint32_t read_pos
Definition: lz_encoder.h:63
lzma_lzma2_coder::need_dictionary_reset
bool need_dictionary_reset
Definition: lzma2_decoder.c:50
lzma_vli_decode
lzma_ret lzma_vli_decode(lzma_vli *vli, size_t *vli_pos, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow
Decode a variable-length integer.
lzma_block_coder::pos
size_t pos
Position in the Check field.
Definition: block_encoder.c:40
first_filename_printed
static bool first_filename_printed
Definition: message.c:35
opt_flush_timeout
uint64_t opt_flush_timeout
Number of milliseconds to between LZMA_SYNC_FLUSHes.
Definition: mytime.c:19
lzma_filter_info_s::init
lzma_init_function init
Definition: common.h:127
lzma_check_size
uint32_t lzma_check_size(lzma_check check) lzma_nothrow lzma_attr_const
Get the size of the Check field with the given Check ID.
Definition: check.c:64
lzma_block_total_size
lzma_vli lzma_block_total_size(const lzma_block *block) lzma_nothrow lzma_attr_pure
Calculate the total encoded size of a Block.
Definition: block_util.c:82
lzma_index_coder::count
lzma_vli count
Number of Records left to decode.
Definition: index_decoder.c:40
lzma_lzma_lclppb_encode
bool lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
Encodes lc/lp/pb into one byte. Returns false on success and true on error.
Definition: lzma_encoder.c:645
parse_args
static void parse_args(int argc, char **argv)
Parse command line options.
Definition: lzmainfo.c:58
lzma_crc64
uint64_t lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
Calculate CRC64.
Definition: crc64_small.c:41
lzma_vli_is_valid
#define lzma_vli_is_valid(vli)
Validate a variable-length integer.
Definition: vli.h:75
lzma_stream_coder_s::threads
worker_thread * threads
Array of allocated thread-specific structures.
Definition: stream_encoder_mt.c:146
lzma_sha256_state::size
uint64_t size
Size of the message excluding padding.
Definition: check.h:46
lzma_lz_options::before_size
size_t before_size
Definition: lz_encoder.h:132
lzma_easy_preset
bool lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
Definition: easy_preset.c:17
lzma_simple_coder::allocated
size_t allocated
Size of the memory allocated for the buffer.
Definition: simple_private.h:47
non_last_ok
bool non_last_ok
Definition: filter_common.c:25
LZMA_PRESET_EXTREME
#define LZMA_PRESET_EXTREME
Extreme compression preset.
Definition: container.h:60
signals_block
void signals_block(void)
Definition: signals.c:120
index_cat_info::streams
index_tree * streams
Destination index' Stream tree.
Definition: index.c:736
xz_file_info
Information about a .xz file.
Definition: list.c:18
lzma_lzma1_decoder::is_rep
probability is_rep[STATES]
If 1, it's a repeated match. The distance is one of rep0 .. rep3.
Definition: lzma_decoder.c:182
lzma_mt::block_size
uint64_t block_size
Maximum uncompressed size of a Block.
Definition: container.h:104
lzma_index_s::record_count
lzma_vli record_count
Total number of Records in all Streams in this lzma_index.
Definition: index.c:158
lzma_index_decoder
lzma_ret lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
Initialize .xz Index decoder.
Definition: index_decoder.c:297
LZMA_FILTER_ARM
#define LZMA_FILTER_ARM
Definition: bcj.h:37
lzma_vli_size
uint32_t lzma_vli_size(lzma_vli vli)
Get the number of bytes required to encode a VLI.
Definition: vli_size.c:17
copy_or_code
static lzma_ret copy_or_code(lzma_simple_coder *coder, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action)
Copied or encodes/decodes more data to out[].
Definition: simple_coder.c:21
list.h
List information about .xz files.
lzma_index_coder::pos
size_t pos
Position in integers.
Definition: index_decoder.c:49
user_abort
volatile sig_atomic_t user_abort
Definition: signals.c:16
header
#define header(is_bt, len_min, ret_op)
Definition: lz_encoder_mf.c:191
lzma_lzma1_encoder_s::pos_mask
uint32_t pos_mask
(1 << pos_bits) - 1
Definition: lzma_encoder_private.h:103
lzma_lzma1_decoder::rep3
uint32_t rep3
Distance of fourth latest match.
Definition: lzma_decoder.c:231
message_filename
void message_filename(const char *src_name)
Set the name of the current file and possibly print it too.
Definition: message.c:227
lzma_lz_encoder::code
lzma_ret(* code)(void *coder, lzma_mf *restrict mf, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size)
Function to encode from *dict to out[].
Definition: lz_encoder.h:197
lzma_outq_is_readable
bool lzma_outq_is_readable(const lzma_outq *outq)
Test if there is data ready to be read.
Definition: outqueue.c:136
lzma_stream_coder_s::progress_out
uint64_t progress_out
Definition: stream_encoder_mt.c:172
exit_status_type
exit_status_type
Possible exit status values. These are the same as used by gzip and bzip2.
Definition: main.h:14
is_lclppb_valid
static bool is_lclppb_valid(const lzma_options_lzma *options)
Validates lc, lp, and pb.
Definition: lzma_common.h:33
stream_decoder.h
Decodes .xz Streams.
lzma_simple_coder::simple
void * simple
Definition: simple_private.h:39
hardware_threads_get
uint32_t hardware_threads_get(void)
Get the maximum number of worker threads.
Definition: hardware.c:55
literal_subcoder
#define literal_subcoder(probs, lc, lp_mask, pos, prev_byte)
Definition: lzma_common.h:124
LZMA_MODE_NORMAL
@ LZMA_MODE_NORMAL
Normal compression.
Definition: lzma12.h:147
lzma_raw_buffer_decode
lzma_ret lzma_raw_buffer_decode(const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow
Single-call raw decoder.
Definition: filter_buffer_decoder.c:17
lzma_stream_coder::filters
lzma_filter filters[LZMA_FILTERS_MAX+1]
The filter chain currently in use.
Definition: stream_encoder.c:39
V_SILENT
@ V_SILENT
No messages.
Definition: message.h:15
lzma_mt::preset
uint32_t preset
Compression preset (level and possible flags)
Definition: container.h:143
lzma_index_coder
Definition: index_decoder.c:17
LZMA_FILTER_X86
#define LZMA_FILTER_X86
Definition: bcj.h:22
worker_thread_s::in_size
size_t in_size
Definition: stream_encoder_mt.c:60
parse_indexes
static bool parse_indexes(xz_file_info *xfi, file_pair *pair)
Parse the Index(es) from the given .xz file.
Definition: list.c:150
lzma_lz_options::match_finder
lzma_match_finder match_finder
Type of the match finder to use.
Definition: lz_encoder.h:151
lzma_outq_read
lzma_ret lzma_outq_read(lzma_outq *restrict outq, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_vli *restrict unpadded_size, lzma_vli *restrict uncompressed_size)
Read finished data.
Definition: outqueue.c:147
lzma_outq::bufs_mem
uint8_t * bufs_mem
Memory allocated for all the buffers.
Definition: outqueue.h:42
LZMA_MEMUSAGE_BASE
#define LZMA_MEMUSAGE_BASE
Definition: common.h:63
STATES
#define STATES
Total number of states.
Definition: lzma_common.h:73
my_snprintf
void my_snprintf(char **pos, size_t *left, const char *fmt,...) lzma_attribute((__format__(__printf__
Wrapper for snprintf() to help constructing a string in pieces.
lzma_stream_coder::stream_flags
lzma_stream_flags stream_flags
Stream Flags from Stream Header.
Definition: stream_decoder.c:37
lzma_stream_coder
Definition: stream_decoder.c:17
lzma_outq_init
lzma_ret lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator, uint64_t buf_size_max, uint32_t threads)
Initialize an output queue.
Definition: outqueue.c:57
is_tty_stdout
bool is_tty_stdout(void)
Test if stdout is a terminal.
Definition: util.c:279
index_group::records
index_record records[]
Definition: index.c:102
lzma_index_iter_rewind
void lzma_index_iter_rewind(lzma_index_iter *iter)
Rewind the iterator.
Definition: index.c:1092
LZMA_FILTER_DELTA
#define LZMA_FILTER_DELTA
Filter ID.
Definition: delta.h:25
lzma_index_iter
Iterator to get information about Blocks and Streams.
Definition: index.h:43
simple_decoder.h
Properties decoder for simple filters.
message_try_help
void message_try_help(void)
Print a message that user should try –help.
Definition: message.c:1049
lzma_strm_init
lzma_ret lzma_strm_init(lzma_stream *strm)
Definition: common.c:166
lzma_raw_buffer_decode
lzma_ret lzma_raw_buffer_decode(const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call raw decoder.
Definition: filter_buffer_decoder.c:17
range_decoder.h
Range Decoder.
progress_speed
static const char * progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
Make the string containing the processing speed of uncompressed data.
Definition: message.c:345
hardware_memlimit_show
void hardware_memlimit_show(void) lzma_attribute((__noreturn__))
Display the amount of RAM and memory usage limits and exit.
Definition: hardware.c:118
lzma_alloc
void * lzma_alloc(size_t size, const lzma_allocator *allocator) lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
Allocates memory.
lzma_next_coder_s::init
uintptr_t init
Definition: common.h:147
io_fix_src_pos
void io_fix_src_pos(file_pair *pair, size_t rewind_size)
Fix the position in src_fd.
Definition: file_io.c:1097
check_default
static bool check_default
This becomes false if the –check=CHECK option is used.
Definition: coder.c:52
lzma_block_coder::compressed_limit
lzma_vli compressed_limit
Definition: block_decoder.c:41
util.h
Miscellaneous utility functions.
last_ok
bool last_ok
Definition: filter_common.c:29
lzma_index_buffer_decode
lzma_ret lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow
Single-call .xz Index decoder.
Definition: index_decoder.c:309
lzma_index_block_count
lzma_vli lzma_index_block_count(const lzma_index *i) lzma_nothrow lzma_attr_pure
Get the number of Blocks.
Definition: index.c:498
lzma_stream_coder::block_encoder_is_initialized
bool block_encoder_is_initialized
Definition: stream_encoder.c:30
index.h
Handling of Index.
xz_file_info::all_have_sizes
bool all_have_sizes
Definition: list.c:30
lzma_mf_s::pending
uint32_t pending
Definition: lz_encoder.h:84
LZMA_BUF_ERROR
@ LZMA_BUF_ERROR
No progress is possible.
Definition: base.h:191
check_value
static char check_value[2 *LZMA_CHECK_SIZE_MAX+1]
Definition: list.c:95
index_stream
Definition: index.c:107
lzma_coder::next_finished
bool next_finished
True if the next filter in the chain has returned LZMA_STREAM_END.
Definition: lz_decoder.c:36
FILTERS_STR_SIZE
#define FILTERS_STR_SIZE
Buffer size for message_filters_to_str()
Definition: message.h:94
message_progress_update
void message_progress_update(void)
Definition: message.c:531
lzma_easy_buffer_encode
lzma_ret lzma_easy_buffer_encode(uint32_t preset, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
Single-call .xz Stream encoding using a preset number.
Definition: easy_buffer_encoder.c:17
message_progress_end
void message_progress_end(bool success)
Finishes the progress message if we were in verbose mode.
Definition: message.c:693
mytime_set_start_time
void mytime_set_start_time(void)
Store the time when (de)compression was started.
Definition: mytime.c:52
lzma_crc32_table
uint32_t lzma_crc32_table[1][256]
Definition: crc32_small.c:16
message_verbosity_increase
void message_verbosity_increase(void)
Increase verbosity level by one step unless it was at maximum.
Definition: message.c:156
check_thousand_sep
static void check_thousand_sep(uint32_t slot)
Definition: util.c:148
range_encoder.h
Range Encoder.
file_pair::dest_fd
int dest_fd
File descriptor of the target file.
Definition: file_io.h:44
message_mem_needed
void message_mem_needed(enum message_verbosity v, uint64_t memusage)
Display how much memory was needed and how much the limit was.
Definition: message.c:832
index_dup_stream
static index_stream * index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
Duplicate an index_stream.
Definition: index.c:865
BUF_SIZE_MAX
#define BUF_SIZE_MAX
Definition: outqueue.c:19
io_open_src
file_pair * io_open_src(const char *src_name)
Open the source file.
Definition: file_io.c:739
coder_free
void coder_free(void)
Free the memory allocated for the coder and kill the worker threads.
Definition: coder.c:931
list_file
void list_file(const char *filename)
List information about the given .xz file.
Definition: list.c:1143
lzma_lzma1_decoder::sequence
enum lzma_lzma1_decoder::@22 sequence
Position where to continue the decoder loop.
message_filters_to_str
void message_filters_to_str(char buf[FILTERS_STR_SIZE], const lzma_filter *filters, bool all_known)
Get the filter chain as a string.
Definition: message.c:903
lzma_stream_header_encode
lzma_ret lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result
Encode Stream Header.
Definition: stream_flags_encoder.c:30
index_tree_node_s
Definition: index.c:30
lzma_check_init
void lzma_check_init(lzma_check_state *check, lzma_check type)
Initialize *check depending on type.
Definition: check.c:84
RC_SYMBOLS_MAX
#define RC_SYMBOLS_MAX
Definition: range_encoder.h:24
coder.h
Compresses or uncompresses a file.
lzma_index_s::checks
uint32_t checks
Definition: index.c:177
lzma_mode_is_supported
lzma_bool lzma_mode_is_supported(lzma_mode mode)
Test if given compression mode is supported.
Definition: lzma_encoder.c:674
lzma_index_total_size
lzma_vli lzma_index_total_size(const lzma_index *i)
Get the total size of the Blocks.
Definition: index.c:519
get_ratio
static const char * get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
Get the compression ratio.
Definition: list.c:611
lzma_stream_flags::backward_size
lzma_vli backward_size
Backward Size.
Definition: stream_flags.h:69
block_header_info::header_size
uint32_t header_size
Size of the Block Header.
Definition: list.c:43
lzma_block_coder::check
lzma_check_state check
Check of the uncompressed data.
Definition: block_decoder.c:47
LZMA_FILTER_POWERPC
#define LZMA_FILTER_POWERPC
Definition: bcj.h:27
vli.h
Variable-length integer handling.
lzma_block
Options for the Block and Block Header encoders and decoders.
Definition: block.h:30
lzma_lz_encoder::coder
void * coder
Data specific to the LZ-based encoder.
Definition: lz_encoder.h:194
index_stream_init
static index_stream * index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base, uint32_t stream_number, lzma_vli block_number_base, const lzma_allocator *allocator)
Allocate and initialize a new Stream using the given base offsets.
Definition: index.c:340
verbosity
static enum message_verbosity verbosity
Verbosity level.
Definition: message.c:25
lzma_filter_encoder_is_supported
lzma_bool lzma_filter_encoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const
Test if the given Filter ID is supported for encoding.
Definition: filter_encoder.c:165
lzma_lz_decoder::code
lzma_ret(* code)(void *coder, lzma_dict *restrict dict, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size)
Function to decode from in[] to *dict.
Definition: lz_decoder.h:59
lzma_options_lzma::mf
lzma_match_finder mf
Definition: lzma12.h:345
xz_file_info::idx
lzma_index * idx
Combined Index of all Streams in the file.
Definition: list.c:20
mytime_set_flush_time
void mytime_set_flush_time(void)
Store the time of when compressor was flushed.
Definition: mytime.c:69
tuklib_physmem
#define tuklib_physmem
Get the amount of physical memory in bytes.
Definition: tuklib_physmem.h:19
lzma_index_iter_next
lzma_bool lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
Get the next Block or Stream.
Definition: index.c:1103
message
void message(enum message_verbosity verbosity, const char *fmt,...) lzma_attribute((__format__(__printf__
Print a message if verbosity level is at least "verbosity".
mf_unencoded
static uint32_t mf_unencoded(const lzma_mf *mf)
Definition: lz_encoder.h:238
lzma_outq::bufs
lzma_outbuf * bufs
Array of buffers that are used cyclically.
Definition: outqueue.h:39
block_header_info::filter_chain
char filter_chain[FILTERS_STR_SIZE]
The filter chain of this Block in human-readable form.
Definition: list.c:55
lzma_block_buffer_bound
size_t lzma_block_buffer_bound(size_t uncompressed_size)
Calculate maximum output size for single-call Block encoding.
Definition: block_buffer_encoder.c:74
lzma_block_coder::ignore_check
bool ignore_check
True if the integrity check won't be calculated and verified.
Definition: block_decoder.c:50
memlimit_show
static void memlimit_show(const char *str, uint64_t value)
Helper for hardware_memlimit_show() to print one human-readable info line.
Definition: hardware.c:101
io_pread
bool io_pread(file_pair *pair, io_buf *buf, size_t size, off_t pos)
Read from source file from given offset to a buffer.
Definition: file_io.c:1172
print_filename
static void print_filename(void)
Definition: message.c:195
progress_needs_updating
static bool progress_needs_updating
Definition: message.c:100
coder_init_ret
coder_init_ret
Return value type for coder_init().
Definition: coder.c:17
lzma_lzma_preset
lzma_bool lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
Set a compression preset to lzma_options_lzma structure.
Definition: lzma_encoder_presets.c:18
LZMA_NO_CHECK
@ LZMA_NO_CHECK
Input stream has no integrity check.
Definition: base.h:75
lzma_stream_flags::check
lzma_check check
Check ID.
Definition: stream_flags.h:79
sysdefs.h
Common includes, definitions, system-specific things etc.
lzma_index_hash_s::blocks
lzma_index_hash_info blocks
Information collected while decoding the actual Blocks.
Definition: index_hash.c:49
lzma_coder::dict
lzma_dict dict
Dictionary (history buffer)
Definition: lz_decoder.c:25
index_cat_helper
static void index_cat_helper(const index_cat_info *info, index_stream *this)
Definition: index.c:745
lzma_filter_encoder
Definition: filter_encoder.c:21
lzma_filter_info_s::id
lzma_vli id
Definition: common.h:123
opt_block_size
uint64_t opt_block_size
Definition: coder.c:28
hardware_threads_get
uint32_t hardware_threads_get(void)
Get the maximum number of worker threads.
Definition: hardware.c:55
LZMA_VLI_BYTES_MAX
#define LZMA_VLI_BYTES_MAX
Maximum supported encoded length of variable length integers.
Definition: vli.h:44
lzma_index_hash_decode
lzma_ret lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result
Decode and validate the Index field.
Definition: index_hash.c:175
lzma_index_dup
lzma_index * lzma_index_dup(const lzma_index *i, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result
Duplicate lzma_index.
Definition: index.c:926
lzma_lzma1_encoder_s
Definition: lzma_encoder_private.h:72
rc_bit_last
#define rc_bit_last(prob, action0, action1, seq)
Definition: range_decoder.h:140
lzma_lzma1_encoder_s::rc
lzma_range_encoder rc
Range encoder.
Definition: lzma_encoder_private.h:74
lzma_alone_coder::memusage
uint64_t memusage
Amount of memory actually needed (only an estimate)
Definition: alone_decoder.c:44
LZMA_TELL_ANY_CHECK
#define LZMA_TELL_ANY_CHECK
Definition: container.h:474
lzma_index_end
void lzma_index_end(lzma_index *i, const lzma_allocator *allocator)
Deallocate lzma_index.
Definition: index.c:417
LZMA_DATA_ERROR
@ LZMA_DATA_ERROR
Data is corrupt.
Definition: base.h:172