Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
coder.h File Reference

Compresses or uncompresses a file. More...

Go to the source code of this file.

Data Structures

struct  block_list_entry
 Array of these hold the entries specified with –block-list. More...
 

Enumerations

enum  operation_mode { MODE_COMPRESS , MODE_DECOMPRESS , MODE_TEST , MODE_LIST }
 
enum  format_type { FORMAT_AUTO , FORMAT_XZ , FORMAT_LZMA , FORMAT_RAW }
 

Functions

void coder_set_check (lzma_check check)
 Set the integrity check type used when compressing.
 
void coder_set_preset (uint32_t new_preset)
 Set preset number.
 
void coder_set_extreme (void)
 Enable extreme mode.
 
void coder_add_filter (lzma_vli id, void *options)
 Add a filter to the custom filter chain.
 
void coder_set_compression_settings (void)
 
void coder_run (const char *filename)
 Compress or decompress the given file.
 
void coder_free (void)
 Free the memory allocated for the coder and kill the worker threads.
 
void coder_add_filters_from_str (const char *filter_str)
 Create filter chain from string.
 
void coder_add_block_filters (const char *str, size_t slot)
 Add or overwrite a filter that can be used by the block-list.
 

Variables

enum operation_mode opt_mode
 
enum format_type opt_format
 
bool opt_auto_adjust
 
bool opt_single_stream
 If true, stop after decoding the first stream.
 
uint64_t opt_block_size
 
block_list_entryopt_block_list
 List of block size and filter chain pointer pairs.
 
uint64_t block_list_largest
 
uint32_t block_list_chain_mask
 Bitmask indicating which filter chains we specified in –block-list.
 

Detailed Description

Compresses or uncompresses a file.

Enumeration Type Documentation

◆ format_type

Enumerator
FORMAT_AUTO 
FORMAT_XZ 
FORMAT_LZMA 
FORMAT_RAW 

◆ operation_mode

Enumerator
MODE_COMPRESS 
MODE_DECOMPRESS 
MODE_TEST 
MODE_LIST 

Function Documentation

◆ coder_add_block_filters()

void coder_add_block_filters ( const char * str,
size_t slot )
extern

Add or overwrite a filter that can be used by the block-list.

◆ coder_add_filter()

void coder_add_filter ( lzma_vli id,
void * options )
extern

Add a filter to the custom filter chain.

◆ coder_add_filters_from_str()

void coder_add_filters_from_str ( const char * filter_str)
extern

Create filter chain from string.

◆ coder_free()

void coder_free ( void )
extern

Free the memory allocated for the coder and kill the worker threads.

◆ coder_run()

void coder_run ( const char * filename)
extern

Compress or decompress the given file.

◆ coder_set_check()

void coder_set_check ( lzma_check check)
extern

Set the integrity check type used when compressing.

◆ coder_set_compression_settings()

void coder_set_compression_settings ( void )
extern

Set and partially validate compression settings. This can also be used in decompression or test mode with the raw format.

◆ coder_set_extreme()

void coder_set_extreme ( void )
extern

Enable extreme mode.

◆ coder_set_preset()

void coder_set_preset ( uint32_t new_preset)
extern

Set preset number.

Variable Documentation

◆ block_list_chain_mask

uint32_t block_list_chain_mask
extern

Bitmask indicating which filter chains we specified in –block-list.

◆ block_list_largest

uint64_t block_list_largest
extern

Size of the largest Block that was specified in –block-list. This is used to limit the block_size option of multithreaded encoder. It's waste of memory to specify a too large block_size and reducing it might even allow using more threads in some cases.

NOTE: If the last entry in –block-list is the special value of 0 (which gets converted to UINT64_MAX), it counts here as UINT64_MAX too. This way the multithreaded encoder's Block size won't be reduced.

◆ opt_auto_adjust

bool opt_auto_adjust
extern

If true, the compression settings are automatically adjusted down if they exceed the memory usage limit.

◆ opt_block_list

block_list_entry* opt_block_list
extern

List of block size and filter chain pointer pairs.

This is non-NULL if –block-list was used. This contains the Block sizes as an array that is terminated with 0.

◆ opt_block_size

uint64_t opt_block_size
extern

If non-zero, start a new .xz Block after every opt_block_size bytes of input. This has an effect only when compressing to the .xz format.

◆ opt_format

enum format_type opt_format
extern

File format to use when encoding or what format(s) to accept when decoding. This is a global because it's needed also in suffix.c. This is set in args.c.

◆ opt_mode

enum operation_mode opt_mode
extern

Operation mode of the command line tool. This is set in args.c and read in several files.

◆ opt_single_stream

bool opt_single_stream
extern

If true, stop after decoding the first stream.