Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
config.c File Reference
#include "config.h"
#include "levels.h"

Macros

#define FAST_LEVEL(x)
 
#define LEVEL(x)
 
#define ROW_LEVEL(x, y)
 
#define PARAM_VALUES(pv)
 
#define FAST_LEVEL(x)
 
#define LEVEL(x)
 
#define ROW_LEVEL(x, y)
 

Functions

int config_skip_data (config_t const *config, data_t const *data)
 
int config_get_level (config_t const *config)
 
ZSTD_parameters config_get_zstd_params (config_t const *config, uint64_t srcSize, size_t dictSize)
 

Variables

config_t const *constconfigs = g_configs
 

Macro Definition Documentation

◆ FAST_LEVEL [1/2]

#define FAST_LEVEL ( x)
Value:
param_value_t const level_fast##x##_param_values[] = { \
{.param = ZSTD_c_compressionLevel, .value = -x}, \
}; \
config_t const level_fast##x = { \
.name = "level -" #x, \
.cli_args = "--fast=" #x, \
.param_values = PARAM_VALUES(level_fast##x##_param_values), \
}; \
config_t const level_fast##x##_dict = { \
.name = "level -" #x " with dict", \
.cli_args = "--fast=" #x, \
.param_values = PARAM_VALUES(level_fast##x##_param_values), \
.use_dictionary = 1, \
};
Definition config.h:34
Definition config.h:21
@ ZSTD_c_compressionLevel
Definition zstd.h:277
#define PARAM_VALUES(pv)
Definition config.c:161

◆ FAST_LEVEL [2/2]

#define FAST_LEVEL ( x)
Value:
&level_fast##x, &level_fast##x##_dict,

◆ LEVEL [1/2]

#define LEVEL ( x)

◆ LEVEL [2/2]

#define LEVEL ( x)
Value:
&level_##x, &level_##x##_dict, &level_##x##_dict_dms, &level_##x##_dict_dds, &level_##x##_dict_copy, &level_##x##_dict_load,

◆ PARAM_VALUES

#define PARAM_VALUES ( pv)
Value:
{ .data = pv, .size = sizeof(pv) / sizeof((pv)[0]) }

◆ ROW_LEVEL [1/2]

#define ROW_LEVEL ( x,
y )

◆ ROW_LEVEL [2/2]

#define ROW_LEVEL ( x,
y )
Value:
&row_##y##_level_##x, &row_##y##_level_##x##_dict_dms, &row_##y##_level_##x##_dict_dds, &row_##y##_level_##x##_dict_copy, &row_##y##_level_##x##_dict_load,

Function Documentation

◆ config_get_level()

int config_get_level ( config_t const * config)

Returns the compression level specified by the config, or CONFIG_NO_LEVEL if no level is specified. Note that 0 is a valid compression level, meaning default.

◆ config_get_zstd_params()

ZSTD_parameters config_get_zstd_params ( config_t const * config,
uint64_t srcSize,
size_t dictSize )

Returns the compression parameters specified by the config.

◆ config_skip_data()

int config_skip_data ( config_t const * config,
data_t const * data )

Returns true if the config should skip this data. For instance, if the config requires a dictionary but the data doesn't have one.

Variable Documentation

◆ configs

config_t const* const* configs = g_configs

The NULL-terminated list of configs.