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

Side by Side Diff: xz/src/liblzma/simple/simple_encoder.c

Issue 2869016: Add an unpatched version of xz, XZ Utils, to /trunk/deps/third_party (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 10 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 | « xz/src/liblzma/simple/simple_encoder.h ('k') | xz/src/liblzma/simple/simple_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 /// \file simple_encoder.c
4 /// \brief Properties encoder for simple filters
5 //
6 // Author: Lasse Collin
7 //
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
10 //
11 ///////////////////////////////////////////////////////////////////////////////
12
13 #include "simple_encoder.h"
14
15
16 extern lzma_ret
17 lzma_simple_props_size(uint32_t *size, const void *options)
18 {
19 const lzma_options_bcj *const opt = options;
20 *size = (opt == NULL || opt->start_offset == 0) ? 0 : 4;
21 return LZMA_OK;
22 }
23
24
25 extern lzma_ret
26 lzma_simple_props_encode(const void *options, uint8_t *out)
27 {
28 const lzma_options_bcj *const opt = options;
29
30 // The default start offset is zero, so we don't need to store any
31 // options unless the start offset is non-zero.
32 if (opt == NULL || opt->start_offset == 0)
33 return LZMA_OK;
34
35 unaligned_write32le(out, opt->start_offset);
36
37 return LZMA_OK;
38 }
OLDNEW
« no previous file with comments | « xz/src/liblzma/simple/simple_encoder.h ('k') | xz/src/liblzma/simple/simple_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698