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

Side by Side Diff: xz/src/liblzma/common/vli_size.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/common/vli_encoder.c ('k') | xz/src/liblzma/delta/Makefile.inc » ('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 vli_size.c
4 /// \brief Calculates the encoded size of a variable-length integer
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 "common.h"
14
15
16 extern LZMA_API(uint32_t)
17 lzma_vli_size(lzma_vli vli)
18 {
19 if (vli > LZMA_VLI_MAX)
20 return 0;
21
22 uint32_t i = 0;
23 do {
24 vli >>= 7;
25 ++i;
26 } while (vli != 0);
27
28 assert(i <= LZMA_VLI_BYTES_MAX);
29 return i;
30 }
OLDNEW
« no previous file with comments | « xz/src/liblzma/common/vli_encoder.c ('k') | xz/src/liblzma/delta/Makefile.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698