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

Side by Side Diff: src/liblzma/common/stream_encoder.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/common/stream_buffer_encoder.c ('k') | src/liblzma/delta/delta_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 stream_encoder.c 3 /// \file stream_encoder.c
4 /// \brief Encodes .xz Streams 4 /// \brief Encodes .xz Streams
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 if (next->coder == NULL) { 274 if (next->coder == NULL) {
275 next->coder = lzma_alloc(sizeof(lzma_coder), allocator); 275 next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
276 if (next->coder == NULL) 276 if (next->coder == NULL)
277 return LZMA_MEM_ERROR; 277 return LZMA_MEM_ERROR;
278 278
279 next->code = &stream_encode; 279 next->code = &stream_encode;
280 next->end = &stream_encoder_end; 280 next->end = &stream_encoder_end;
281 next->update = &stream_encoder_update; 281 next->update = &stream_encoder_update;
282 282
283 next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
283 next->coder->block_encoder = LZMA_NEXT_CODER_INIT; 284 next->coder->block_encoder = LZMA_NEXT_CODER_INIT;
284 next->coder->index_encoder = LZMA_NEXT_CODER_INIT; 285 next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
285 next->coder->index = NULL; 286 next->coder->index = NULL;
286 } 287 }
287 288
288 // Basic initializations 289 // Basic initializations
289 next->coder->sequence = SEQ_STREAM_HEADER; 290 next->coder->sequence = SEQ_STREAM_HEADER;
290 next->coder->block_options.version = 0; 291 next->coder->block_options.version = 0;
291 next->coder->block_options.check = check; 292 next->coder->block_options.check = check;
292 next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
293 293
294 // Initialize the Index 294 // Initialize the Index
295 lzma_index_end(next->coder->index, allocator); 295 lzma_index_end(next->coder->index, allocator);
296 next->coder->index = lzma_index_init(allocator); 296 next->coder->index = lzma_index_init(allocator);
297 if (next->coder->index == NULL) 297 if (next->coder->index == NULL)
298 return LZMA_MEM_ERROR; 298 return LZMA_MEM_ERROR;
299 299
300 // Encode the Stream Header 300 // Encode the Stream Header
301 lzma_stream_flags stream_flags = { 301 lzma_stream_flags stream_flags = {
302 .version = 0, 302 .version = 0,
(...skipping 19 matching lines...) Expand all
322 { 322 {
323 lzma_next_strm_init(lzma_stream_encoder_init, strm, filters, check); 323 lzma_next_strm_init(lzma_stream_encoder_init, strm, filters, check);
324 324
325 strm->internal->supported_actions[LZMA_RUN] = true; 325 strm->internal->supported_actions[LZMA_RUN] = true;
326 strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true; 326 strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
327 strm->internal->supported_actions[LZMA_FULL_FLUSH] = true; 327 strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
328 strm->internal->supported_actions[LZMA_FINISH] = true; 328 strm->internal->supported_actions[LZMA_FINISH] = true;
329 329
330 return LZMA_OK; 330 return LZMA_OK;
331 } 331 }
OLDNEW
« no previous file with comments | « src/liblzma/common/stream_buffer_encoder.c ('k') | src/liblzma/delta/delta_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698