]> wimlib.net Git - wimlib/blob - include/wimlib/decompressor_ops.h
7022dfffc05dc45c075eec2107862d7edaca247a
[wimlib] / include / wimlib / decompressor_ops.h
1 /*
2  * decompressor_ops.h
3  *
4  * Interface implemented by decompressors for specific formats.
5  */
6
7 #ifndef _WIMLIB_DECOMPRESSOR_OPS_H
8 #define _WIMLIB_DECOMPRESSOR_OPS_H
9
10 #include <stddef.h>
11
12 struct wimlib_decompressor_params_header;
13
14 struct decompressor_ops {
15
16         int (*create_decompressor)(size_t max_block_size,
17                                    const struct wimlib_decompressor_params_header *extra_params,
18                                    void **private_ret);
19
20         int (*decompress)(const void *compressed_data,
21                           size_t compressed_size,
22                           void *uncompressed_data,
23                           size_t uncompressed_size,
24                           void *private);
25
26         void (*free_decompressor)(void *private);
27 };
28
29 extern const struct decompressor_ops lzx_decompressor_ops;
30 extern const struct decompressor_ops xpress_decompressor_ops;
31 extern const struct decompressor_ops lzms_decompressor_ops;
32
33 extern void
34 cleanup_decompressor_params(void);
35
36 #endif /* _WIMLIB_DECOMPRESSOR_OPS_H */