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

Unified Diff: src/liblzma/api/lzma/vli.h

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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/liblzma/api/lzma/version.h ('k') | src/liblzma/common/alone_decoder.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liblzma/api/lzma/vli.h
===================================================================
--- src/liblzma/api/lzma/vli.h (revision 50504)
+++ src/liblzma/api/lzma/vli.h (working copy)
@@ -29,7 +29,7 @@
/**
- * \brief Maximum supported value of variable-length integer
+ * \brief Maximum supported value of a variable-length integer
*/
#define LZMA_VLI_MAX (UINT64_MAX / 2)
@@ -39,11 +39,10 @@
#define LZMA_VLI_UNKNOWN UINT64_MAX
/**
- * \brief Maximum supported length of variable length integers
+ * \brief Maximum supported encoded length of variable length integers
*/
#define LZMA_VLI_BYTES_MAX 9
-
/**
* \brief VLI constant suffix
*/
@@ -53,19 +52,19 @@
/**
* \brief Variable-length integer type
*
- * This will always be unsigned integer. Valid VLI values are in the range
- * [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN,
- * which is the maximum value of the underlaying integer type.
+ * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is
+ * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the
+ * underlaying integer type.
*
- * In future, even if lzma_vli is defined to be something other than uint64_t,
- * it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli.
- * This simplifies integer overflow detection.
+ * lzma_vli will be uint64_t for the foreseeable future. If a bigger size
+ * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will
+ * not overflow lzma_vli. This simplifies integer overflow detection.
*/
typedef uint64_t lzma_vli;
/**
- * \brief Simple macro to validate variable-length integer
+ * \brief Validate a variable-length integer
*
* This is useful to test that application has given acceptable values
* for example in the uncompressed_size and compressed_size variables.
@@ -88,9 +87,9 @@
*
* \param vli Integer to be encoded
* \param vli_pos How many VLI-encoded bytes have already been written
- * out. When starting to encode a new integer, *vli_pos
- * must be set to zero. To use single-call encoding,
- * set vli_pos to NULL.
+ * out. When starting to encode a new integer in
+ * multi-call mode, *vli_pos must be set to zero.
+ * To use single-call encoding, set vli_pos to NULL.
* \param out Beginning of the output buffer
* \param out_pos The next byte will be written to out[*out_pos].
* \param out_size Size of the out buffer; the first byte into
@@ -126,9 +125,9 @@
* initialize it to zero when *vli_pos == 0, so
* application isn't required to initialize *vli.
* \param vli_pos How many bytes have already been decoded. When
- * starting to decode a new integer, *vli_pos must
- * be initialized to zero. To use single-call decoding,
- * set this to NULL.
+ * starting to decode a new integer in multi-call
+ * mode, *vli_pos must be initialized to zero. To
+ * use single-call decoding, set vli_pos to NULL.
* \param in Beginning of the input buffer
* \param in_pos The next byte will be read from in[*in_pos].
* \param in_size Size of the input buffer; the first byte that
« no previous file with comments | « src/liblzma/api/lzma/version.h ('k') | src/liblzma/common/alone_decoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698