OLD | NEW |
1 /////////////////////////////////////////////////////////////////////////////// | 1 /////////////////////////////////////////////////////////////////////////////// |
2 // | 2 // |
3 /// \file simple_private.h | 3 /// \file simple_private.h |
4 /// \brief Private definitions for so called simple filters | 4 /// \brief Private definitions for so called simple filters |
5 // | 5 // |
6 // Author: Lasse Collin | 6 // Author: Lasse Collin |
7 // | 7 // |
8 // This file has been put into the public domain. | 8 // This file has been put into the public domain. |
9 // You can do whatever you want with this file. | 9 // You can do whatever you want with this file. |
10 // | 10 // |
11 /////////////////////////////////////////////////////////////////////////////// | 11 /////////////////////////////////////////////////////////////////////////////// |
12 | 12 |
13 #ifndef LZMA_SIMPLE_PRIVATE_H | 13 #ifndef LZMA_SIMPLE_PRIVATE_H |
14 #define LZMA_SIMPLE_PRIVATE_H | 14 #define LZMA_SIMPLE_PRIVATE_H |
15 | 15 |
16 #include "simple_coder.h" | 16 #include "simple_coder.h" |
17 | 17 |
18 | 18 |
19 typedef struct lzma_simple_s lzma_simple; | 19 typedef struct lzma_simple_s lzma_simple; |
20 | 20 |
21 struct lzma_coder_s { | 21 struct lzma_coder_s { |
22 /// Next filter in the chain | 22 /// Next filter in the chain |
23 lzma_next_coder next; | 23 lzma_next_coder next; |
24 | 24 |
25 » /// True if the next coder in the chain has returned LZMA_STREAM_END | 25 » /// True if the next coder in the chain has returned LZMA_STREAM_END. |
26 » /// or if we have processed uncompressed_size bytes. | |
27 bool end_was_reached; | 26 bool end_was_reached; |
28 | 27 |
29 /// True if filter() should encode the data; false to decode. | 28 /// True if filter() should encode the data; false to decode. |
30 /// Currently all simple filters use the same function for encoding | 29 /// Currently all simple filters use the same function for encoding |
31 /// and decoding, because the difference between encoders and decoders | 30 /// and decoding, because the difference between encoders and decoders |
32 /// is very small. | 31 /// is very small. |
33 bool is_encoder; | 32 bool is_encoder; |
34 | 33 |
35 /// Pointer to filter-specific function, which does | 34 /// Pointer to filter-specific function, which does |
36 /// the actual filtering. | 35 /// the actual filtering. |
(...skipping 30 matching lines...) Expand all Loading... |
67 | 66 |
68 | 67 |
69 extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next, | 68 extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next, |
70 lzma_allocator *allocator, const lzma_filter_info *filters, | 69 lzma_allocator *allocator, const lzma_filter_info *filters, |
71 size_t (*filter)(lzma_simple *simple, uint32_t now_pos, | 70 size_t (*filter)(lzma_simple *simple, uint32_t now_pos, |
72 bool is_encoder, uint8_t *buffer, size_t size), | 71 bool is_encoder, uint8_t *buffer, size_t size), |
73 size_t simple_size, size_t unfiltered_max, | 72 size_t simple_size, size_t unfiltered_max, |
74 uint32_t alignment, bool is_encoder); | 73 uint32_t alignment, bool is_encoder); |
75 | 74 |
76 #endif | 75 #endif |
OLD | NEW |