1 ///////////////////////////////////////////////////////////////////////////////
3 /// \file filter_common.c
4 /// \brief Filter-specific stuff common for both encoder and decoder
6 // Author: Lasse Collin
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef LZMA_FILTER_COMMON_H
14 #define LZMA_FILTER_COMMON_H
19 /// Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
24 /// Initializes the filter encoder and calls lzma_next_filter_init()
26 lzma_init_function init;
28 /// Calculates memory usage of the encoder. If the options are
29 /// invalid, UINT64_MAX is returned.
30 uint64_t (*memusage)(const void *options);
35 typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
38 extern lzma_ret lzma_raw_coder_init(
39 lzma_next_coder *next, const lzma_allocator *allocator,
40 const lzma_filter *filters,
41 lzma_filter_find coder_find, bool is_encoder);
44 extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
45 const lzma_filter *filters);