4 * Interface implemented by compressors for specific formats.
7 #ifndef _WIMLIB_COMPRESSOR_OPS_H
8 #define _WIMLIB_COMPRESSOR_OPS_H
10 #include "wimlib/types.h"
12 struct compressor_ops {
14 u64 (*get_needed_memory)(size_t max_block_size,
15 unsigned int compression_level);
17 int (*create_compressor)(size_t max_block_size,
18 unsigned int compression_level,
21 size_t (*compress)(const void *uncompressed_data,
22 size_t uncompressed_size,
23 void *compressed_data,
24 size_t compressed_size_avail,
27 void (*free_compressor)(void *private);
30 extern const struct compressor_ops lzx_compressor_ops;
31 extern const struct compressor_ops xpress_compressor_ops;
32 extern const struct compressor_ops lzms_compressor_ops;
34 #endif /* _WIMLIB_COMPRESSOR_OPS_H */