| OLD | NEW |
| 1 /////////////////////////////////////////////////////////////////////////////// | 1 /////////////////////////////////////////////////////////////////////////////// |
| 2 // | 2 // |
| 3 /// \file lz_decoder.c | 3 /// \file lz_decoder.c |
| 4 /// \brief LZ out window | 4 /// \brief LZ out window |
| 5 /// | 5 /// |
| 6 // Authors: Igor Pavlov | 6 // Authors: Igor Pavlov |
| 7 // Lasse Collin | 7 // Lasse Collin |
| 8 // | 8 // |
| 9 // This file has been put into the public domain. | 9 // This file has been put into the public domain. |
| 10 // You can do whatever you want with this file. | 10 // You can do whatever you want with this file. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (ret != LZMA_OK || *out_pos == out_size | 119 if (ret != LZMA_OK || *out_pos == out_size |
| 120 || coder->dict.pos < coder->dict.size) | 120 || coder->dict.pos < coder->dict.size) |
| 121 return ret; | 121 return ret; |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 | 126 |
| 127 static lzma_ret | 127 static lzma_ret |
| 128 lz_decode(lzma_coder *coder, | 128 lz_decode(lzma_coder *coder, |
| 129 » » lzma_allocator *allocator lzma_attribute((unused)), | 129 » » lzma_allocator *allocator lzma_attribute((__unused__)), |
| 130 const uint8_t *restrict in, size_t *restrict in_pos, | 130 const uint8_t *restrict in, size_t *restrict in_pos, |
| 131 size_t in_size, uint8_t *restrict out, | 131 size_t in_size, uint8_t *restrict out, |
| 132 size_t *restrict out_pos, size_t out_size, | 132 size_t *restrict out_pos, size_t out_size, |
| 133 lzma_action action) | 133 lzma_action action) |
| 134 { | 134 { |
| 135 if (coder->next.code == NULL) | 135 if (coder->next.code == NULL) |
| 136 return decode_buffer(coder, in, in_pos, in_size, | 136 return decode_buffer(coder, in, in_pos, in_size, |
| 137 out, out_pos, out_size); | 137 out, out_pos, out_size); |
| 138 | 138 |
| 139 // We aren't the last coder in the chain, we need to decode | 139 // We aren't the last coder in the chain, we need to decode |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 { | 291 { |
| 292 return sizeof(lzma_coder) + (uint64_t)(dictionary_size); | 292 return sizeof(lzma_coder) + (uint64_t)(dictionary_size); |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 extern void | 296 extern void |
| 297 lzma_lz_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size) | 297 lzma_lz_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size) |
| 298 { | 298 { |
| 299 coder->lz.set_uncompressed(coder->lz.coder, uncompressed_size); | 299 coder->lz.set_uncompressed(coder->lz.coder, uncompressed_size); |
| 300 } | 300 } |
| OLD | NEW |