libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
|
Contains declarations to everything related to data compression. More...
Go to the source code of this file.
Data Structures | |
interface | sqfs_compressor_t |
Encapsultes a compressor with a simple interface to compress or extract chunks of data. More... | |
struct | sqfs_compressor_config_t |
Configuration parameters for instantiating a compressor backend. More... | |
Enumerations | |
enum | SQFS_COMP_FLAG { SQFS_COMP_FLAG_LZ4_HC = 0x0001 , SQFS_COMP_FLAG_LZ4_ALL = 0x0001 , SQFS_COMP_FLAG_LZMA_EXTREME = 0x0001 , SQFS_COMP_FLAG_LZMA_ALL = 0x0001 , SQFS_COMP_FLAG_XZ_X86 = 0x0001 , SQFS_COMP_FLAG_XZ_POWERPC = 0x0002 , SQFS_COMP_FLAG_XZ_IA64 = 0x0004 , SQFS_COMP_FLAG_XZ_ARM = 0x0008 , SQFS_COMP_FLAG_XZ_ARMTHUMB = 0x0010 , SQFS_COMP_FLAG_XZ_SPARC = 0x0020 , SQFS_COMP_FLAG_XZ_EXTREME = 0x0100 , SQFS_COMP_FLAG_XZ_ALL = 0x013F , SQFS_COMP_FLAG_GZIP_DEFAULT = 0x0001 , SQFS_COMP_FLAG_GZIP_FILTERED = 0x0002 , SQFS_COMP_FLAG_GZIP_HUFFMAN = 0x0004 , SQFS_COMP_FLAG_GZIP_RLE = 0x0008 , SQFS_COMP_FLAG_GZIP_FIXED = 0x0010 , SQFS_COMP_FLAG_GZIP_ALL = 0x001F , SQFS_COMP_FLAG_UNCOMPRESS = 0x8000 , SQFS_COMP_FLAG_GENERIC_ALL = 0x8000 } |
Flags for configuring the compressor. More... | |
enum | SQFS_LZO_ALGORITHM { SQFS_LZO1X_1 = 0 , SQFS_LZO1X_1_11 = 1 , SQFS_LZO1X_1_12 = 2 , SQFS_LZO1X_1_15 = 3 , SQFS_LZO1X_999 = 4 } |
The available LZO algorithms. More... | |
Functions | |
SQFS_API int | sqfs_compressor_config_init (sqfs_compressor_config_t *cfg, SQFS_COMPRESSOR id, size_t block_size, sqfs_u16 flags) |
Initialize a compressor configuration. | |
SQFS_API int | sqfs_compressor_create (const sqfs_compressor_config_t *cfg, sqfs_compressor_t **out) |
Create an instance of a compressor implementation. | |
SQFS_API const char * | sqfs_compressor_name_from_id (SQFS_COMPRESSOR id) |
Get the name of a compressor backend from its ID. | |
SQFS_API int | sqfs_compressor_id_from_name (const char *name) |
Get the compressor ID using just the name of the backend. | |
Contains declarations to everything related to data compression.
Definition in file compressor.h.
#define SQFS_GZIP_DEFAULT_LEVEL (9) |
Definition at line 329 of file compressor.h.
#define SQFS_GZIP_DEFAULT_WINDOW (15) |
Definition at line 330 of file compressor.h.
#define SQFS_GZIP_MAX_LEVEL (9) |
Definition at line 338 of file compressor.h.
#define SQFS_GZIP_MAX_WINDOW (15) |
Definition at line 347 of file compressor.h.
#define SQFS_GZIP_MIN_LEVEL (1) |
Definition at line 337 of file compressor.h.
#define SQFS_GZIP_MIN_WINDOW (8) |
Definition at line 346 of file compressor.h.
#define SQFS_LZMA_DEFAULT_LC 3 |
Definition at line 371 of file compressor.h.
#define SQFS_LZMA_DEFAULT_LEVEL (5) |
Definition at line 367 of file compressor.h.
#define SQFS_LZMA_DEFAULT_LP 0 |
Definition at line 375 of file compressor.h.
#define SQFS_LZMA_DEFAULT_PB 2 |
Definition at line 379 of file compressor.h.
#define SQFS_LZMA_MAX_DICT_SIZE SQFS_MAX_BLOCK_SIZE |
Definition at line 382 of file compressor.h.
#define SQFS_LZMA_MAX_LC 4 |
Definition at line 370 of file compressor.h.
#define SQFS_LZMA_MAX_LEVEL (9) |
Definition at line 366 of file compressor.h.
#define SQFS_LZMA_MAX_LP 4 |
Definition at line 374 of file compressor.h.
#define SQFS_LZMA_MAX_PB 4 |
Definition at line 378 of file compressor.h.
#define SQFS_LZMA_MIN_DICT_SIZE SQFS_META_BLOCK_SIZE |
Definition at line 381 of file compressor.h.
#define SQFS_LZMA_MIN_LC 0 |
Definition at line 369 of file compressor.h.
#define SQFS_LZMA_MIN_LEVEL (0) |
Definition at line 365 of file compressor.h.
#define SQFS_LZMA_MIN_LP 0 |
Definition at line 373 of file compressor.h.
#define SQFS_LZMA_MIN_PB 0 |
Definition at line 377 of file compressor.h.
#define SQFS_LZO_DEFAULT_ALG SQFS_LZO1X_999 |
Definition at line 332 of file compressor.h.
#define SQFS_LZO_DEFAULT_LEVEL (8) |
Definition at line 333 of file compressor.h.
#define SQFS_LZO_MAX_LEVEL (9) |
Definition at line 341 of file compressor.h.
#define SQFS_LZO_MIN_LEVEL (0) |
Definition at line 340 of file compressor.h.
#define SQFS_XZ_DEFAULT_LC 3 |
Definition at line 355 of file compressor.h.
#define SQFS_XZ_DEFAULT_LEVEL (6) |
Definition at line 351 of file compressor.h.
#define SQFS_XZ_DEFAULT_LP 0 |
Definition at line 359 of file compressor.h.
#define SQFS_XZ_DEFAULT_PB 2 |
Definition at line 363 of file compressor.h.
#define SQFS_XZ_MAX_DICT_SIZE SQFS_MAX_BLOCK_SIZE |
Definition at line 385 of file compressor.h.
#define SQFS_XZ_MAX_LC 4 |
Definition at line 354 of file compressor.h.
#define SQFS_XZ_MAX_LEVEL (9) |
Definition at line 350 of file compressor.h.
#define SQFS_XZ_MAX_LP 4 |
Definition at line 358 of file compressor.h.
#define SQFS_XZ_MAX_PB 4 |
Definition at line 362 of file compressor.h.
#define SQFS_XZ_MIN_DICT_SIZE SQFS_META_BLOCK_SIZE |
Definition at line 384 of file compressor.h.
#define SQFS_XZ_MIN_LC 0 |
Definition at line 353 of file compressor.h.
#define SQFS_XZ_MIN_LEVEL (0) |
Definition at line 349 of file compressor.h.
#define SQFS_XZ_MIN_LP 0 |
Definition at line 357 of file compressor.h.
#define SQFS_XZ_MIN_PB 0 |
Definition at line 361 of file compressor.h.
#define SQFS_ZSTD_DEFAULT_LEVEL (15) |
Definition at line 335 of file compressor.h.
#define SQFS_ZSTD_MAX_LEVEL (22) |
Definition at line 344 of file compressor.h.
#define SQFS_ZSTD_MIN_LEVEL (1) |
Definition at line 343 of file compressor.h.
enum SQFS_COMP_FLAG |
Flags for configuring the compressor.
Definition at line 227 of file compressor.h.
enum SQFS_LZO_ALGORITHM |
The available LZO algorithms.
Definition at line 321 of file compressor.h.
SQFS_API int sqfs_compressor_config_init | ( | sqfs_compressor_config_t * | cfg, |
SQFS_COMPRESSOR | id, | ||
size_t | block_size, | ||
sqfs_u16 | flags | ||
) |
Initialize a compressor configuration.
The detail configuration options are all initialized to the defaults for the compressor in question.
cfg | A pointer to a compressor configuration to initialize |
id | The compressor id to set. |
block_size | The block size to set. |
flags | The compressor flags to set. |
SQFS_API int sqfs_compressor_create | ( | const sqfs_compressor_config_t * | cfg, |
sqfs_compressor_t ** | out | ||
) |
Create an instance of a compressor implementation.
If this function returns SQFS_ERROR_UNSUPPORTED, it can mean that either the compressor is not supported at all by the version of libsquashfs you are using, or that the specific configuration that has been requested is not supported (e.g. unknown flags, or the local version can only uncompress, but not compress).
cfg | A pointer to a compressor configuration. |
out | Returns a pointer to the compressor on success. |
SQFS_API int sqfs_compressor_id_from_name | ( | const char * | name | ) |
Get the compressor ID using just the name of the backend.
name | The name of the compressor backend. |
SQFS_API const char * sqfs_compressor_name_from_id | ( | SQFS_COMPRESSOR | id | ) |
Get the name of a compressor backend from its ID.
id | An SQFS_COMPRESSOR identifier. |