]> wimlib.net Git - wimlib/blob - include/wimlib/compressor_ops.h
Rename inode_first_dentry() => inode_any_dentry()
[wimlib] / include / wimlib / compressor_ops.h
1 /*
2  * compressor_ops.h
3  *
4  * Interface implemented by compressors for specific formats.
5  */
6
7 #ifndef _WIMLIB_COMPRESSOR_OPS_H
8 #define _WIMLIB_COMPRESSOR_OPS_H
9
10 #include "wimlib/types.h"
11
12 struct compressor_ops {
13
14         u64 (*get_needed_memory)(size_t max_block_size,
15                                  unsigned int compression_level,
16                                  bool destructive);
17
18         int (*create_compressor)(size_t max_block_size,
19                                  unsigned int compression_level,
20                                  bool destructive,
21                                  void **private_ret);
22
23         size_t (*compress)(const void *uncompressed_data,
24                            size_t uncompressed_size,
25                            void *compressed_data,
26                            size_t compressed_size_avail,
27                            void *private);
28
29         void (*free_compressor)(void *private);
30 };
31
32 extern const struct compressor_ops lzx_compressor_ops;
33 extern const struct compressor_ops xpress_compressor_ops;
34 extern const struct compressor_ops lzms_compressor_ops;
35
36 #endif /* _WIMLIB_COMPRESSOR_OPS_H */