diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2012-10-16 21:50:15 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2012-10-16 21:50:15 (GMT) |
commit | 66be4025df5d1e746161e77d6ab394e646c6b682 (patch) | |
tree | 8cdcd78be21c4b4d3aa9d17d0ec318da34605d23 /lz4.h | |
parent | 9577c977a90bc85eaa2fe8550202a2cdf15b1e5f (diff) | |
download | lz4-66be4025df5d1e746161e77d6ab394e646c6b682.zip lz4-66be4025df5d1e746161e77d6ab394e646c6b682.tar.gz lz4-66be4025df5d1e746161e77d6ab394e646c6b682.tar.bz2 |
Correct issue 36 on LZ4_uncompress_unknownOutputSize(). Thanks to Clayton Stangeland and Maciej Adamczyk for notifying.
Converted tabs to space
git-svn-id: https://lz4.googlecode.com/svn/trunk@78 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4.h')
-rw-r--r-- | lz4.h | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -47,22 +47,22 @@ int LZ4_uncompress (const char* source, char* dest, int osize); /*
LZ4_compress() :
- Compresses 'isize' bytes from 'source' into 'dest'.
- Destination buffer must be already allocated,
- and must be sized to handle worst cases situations (input data not compressible)
- Worst case size evaluation is provided by macro LZ4_compressBound()
+ Compresses 'isize' bytes from 'source' into 'dest'.
+ Destination buffer must be already allocated,
+ and must be sized to handle worst cases situations (input data not compressible)
+ Worst case size evaluation is provided by macro LZ4_compressBound()
- isize : is the input size. Max supported value is ~1.9GB
- return : the number of bytes written in buffer dest
+ isize : is the input size. Max supported value is ~1.9GB
+ return : the number of bytes written in buffer dest
LZ4_uncompress() :
- osize : is the output size, therefore the original size
- return : the number of bytes read in the source buffer
- If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
- This function never writes beyond dest + osize, and is therefore protected against malicious data packets
- note : destination buffer must be already allocated.
- its size must be a minimum of 'osize' bytes.
+ osize : is the output size, therefore the original size
+ return : the number of bytes read in the source buffer
+ If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
+ This function never writes beyond dest + osize, and is therefore protected against malicious data packets
+ note : destination buffer must be already allocated.
+ its size must be a minimum of 'osize' bytes.
*/
@@ -74,12 +74,12 @@ LZ4_uncompress() : /*
LZ4_compressBound() :
- Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible)
- primarily useful for memory allocation of output buffer.
+ Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible)
+ primarily useful for memory allocation of output buffer.
- isize : is the input size. Max supported value is ~1.9GB
- return : maximum output size in a "worst case" scenario
- note : this function is limited by "int" range (2^31-1)
+ isize : is the input size. Max supported value is ~1.9GB
+ return : maximum output size in a "worst case" scenario
+ note : this function is limited by "int" range (2^31-1)
*/
@@ -88,13 +88,13 @@ int LZ4_compress_limitedOutput (const char* source, char* dest, int isize, int /*
LZ4_compress_limitedOutput() :
Compress 'isize' bytes from 'source' into an output buffer 'dest' of maximum size 'maxOutputSize'.
- If it cannot achieve it, compression will stop, and result of the function will be zero.
- This function never writes outside of provided output buffer.
+ If it cannot achieve it, compression will stop, and result of the function will be zero.
+ This function never writes outside of provided output buffer.
- isize : is the input size. Max supported value is ~1.9GB
- maxOutputSize : is the size of the destination buffer (which must be already allocated)
- return : the number of bytes written in buffer 'dest'
- or 0 if the compression fails
+ isize : is the input size. Max supported value is ~1.9GB
+ maxOutputSize : is the size of the destination buffer (which must be already allocated)
+ return : the number of bytes written in buffer 'dest'
+ or 0 if the compression fails
*/
@@ -102,13 +102,13 @@ int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, /*
LZ4_uncompress_unknownOutputSize() :
- isize : is the input size, therefore the compressed size
- maxOutputSize : is the size of the destination buffer (which must be already allocated)
- return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize)
- If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
- This function never writes beyond dest + maxOutputSize, and is therefore protected against malicious data packets
- note : Destination buffer must be already allocated.
- This version is slightly slower than LZ4_uncompress()
+ isize : is the input size, therefore the compressed size
+ maxOutputSize : is the size of the destination buffer (which must be already allocated)
+ return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize)
+ If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
+ This function never writes beyond dest + maxOutputSize, and is therefore protected against malicious data packets
+ note : Destination buffer must be already allocated.
+ This version is slightly slower than LZ4_uncompress()
*/
|