Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/liblzma/common/alone_decoder.c

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/liblzma/api/lzma/vli.h ('k') | src/liblzma/common/alone_encoder.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /////////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////////
2 // 2 //
3 /// \file alone_decoder.c 3 /// \file alone_decoder.c
4 /// \brief Decoder for LZMA_Alone files 4 /// \brief Decoder for LZMA_Alone files
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 //
(...skipping 28 matching lines...) Expand all
39 uint64_t memusage; 39 uint64_t memusage;
40 40
41 /// Options decoded from the header needed to initialize 41 /// Options decoded from the header needed to initialize
42 /// the LZMA decoder 42 /// the LZMA decoder
43 lzma_options_lzma options; 43 lzma_options_lzma options;
44 }; 44 };
45 45
46 46
47 static lzma_ret 47 static lzma_ret
48 alone_decode(lzma_coder *coder, 48 alone_decode(lzma_coder *coder,
49 » » lzma_allocator *allocator lzma_attribute((unused)), 49 » » lzma_allocator *allocator lzma_attribute((__unused__)),
50 const uint8_t *restrict in, size_t *restrict in_pos, 50 const uint8_t *restrict in, size_t *restrict in_pos,
51 size_t in_size, uint8_t *restrict out, 51 size_t in_size, uint8_t *restrict out,
52 size_t *restrict out_pos, size_t out_size, 52 size_t *restrict out_pos, size_t out_size,
53 lzma_action action) 53 lzma_action action)
54 { 54 {
55 while (*out_pos < out_size 55 while (*out_pos < out_size
56 && (coder->sequence == SEQ_CODE || *in_pos < in_size)) 56 && (coder->sequence == SEQ_CODE || *in_pos < in_size))
57 switch (coder->sequence) { 57 switch (coder->sequence) {
58 case SEQ_PROPERTIES: 58 case SEQ_PROPERTIES:
59 if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos])) 59 if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos]))
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 extern LZMA_API(lzma_ret) 223 extern LZMA_API(lzma_ret)
224 lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit) 224 lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
225 { 225 {
226 lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit); 226 lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit);
227 227
228 strm->internal->supported_actions[LZMA_RUN] = true; 228 strm->internal->supported_actions[LZMA_RUN] = true;
229 strm->internal->supported_actions[LZMA_FINISH] = true; 229 strm->internal->supported_actions[LZMA_FINISH] = true;
230 230
231 return LZMA_OK; 231 return LZMA_OK;
232 } 232 }
OLDNEW
« no previous file with comments | « src/liblzma/api/lzma/vli.h ('k') | src/liblzma/common/alone_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698