summaryrefslogtreecommitdiffstats
path: root/lz4.h
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2013-07-01 07:50:40 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2013-07-01 07:50:40 (GMT)
commit002a93473db38e83fd309aead9567da4aba6834f (patch)
treeea7895cec078274e8dfb8da18488cc9b80c35244 /lz4.h
parent16c09428225f466a2ee13e060d290e90663e776a (diff)
downloadlz4-002a93473db38e83fd309aead9567da4aba6834f.zip
lz4-002a93473db38e83fd309aead9567da4aba6834f.tar.gz
lz4-002a93473db38e83fd309aead9567da4aba6834f.tar.bz2
Corrected issue 70, 'pack' instruction on IBM AIX
Added : fullbench : can select compression tests or decompression tests Removed extern inline, for compatibility with GNU89, as reported by Maciej Adamczyk lz4.c : made forceinline more explicit Decompression : corrected corner case behaviors (inputSize == 0 and outputSize == 0), thanks Adrien for detailed suggestions Makefile : Removed -march=native parameter, due to incompatibility with some GCC versions git-svn-id: https://lz4.googlecode.com/svn/trunk@98 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4.h')
-rw-r--r--lz4.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lz4.h b/lz4.h
index ec6a64f..693ac65 100644
--- a/lz4.h
+++ b/lz4.h
@@ -42,7 +42,7 @@ extern "C" {
// Compiler Options
//**************************************
#if defined(_MSC_VER) && !defined(__cplusplus) // Visual Studio
-# define inline __forceinline // Visual C is not C99, but supports some kind of inline. Note : we *do* want to force inline
+# define inline __inline // Visual C is not C99, but supports some kind of inline
#endif
@@ -66,8 +66,8 @@ LZ4_compress() :
LZ4_decompress_safe() :
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 or too large, the function will stop decoding and return a negative result.
- This function is protected against any kind of buffer overflow attemps (never writes outside of output buffer, and never reads outside of input buffer). It is therefore protected against malicious data packets
+ If the source stream is detected malformed, the function will stop decoding and return a negative result.
+ This function is protected against buffer overflow exploits (never writes outside of output buffer, and never reads outside of input buffer). Therefore, it is protected against malicious data packets
*/
@@ -82,8 +82,8 @@ static inline int LZ4_compressBound(int isize) { return ((isize) + ((isize)/25
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.
- inline function is recommended for the general case,
- macro is also provided when result needs to be evaluated at compile time (such as table size allocation).
+ inline function is recommended for the general case,
+ macro is also provided when result needs to be evaluated at compilation (such as table size allocation).
isize : is the input size. Max supported value is ~1.9GB
return : maximum output size in a "worst case" scenario
@@ -128,8 +128,8 @@ LZ4_decompress_safe_partial() :
The function stops decompressing operation as soon as 'targetOutputSize' has been reached,
reducing decompression time.
return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize)
- Note : this number might be < 'targetOutputSize' if the number of bytes to decode into the compressed block is not enough.
- Always control how many bytes were decoded.
+ Note : this number can be < 'targetOutputSize' should the compressed block to decode be smaller.
+ Always control how many bytes were decoded.
If the source stream is malformed, the function will stop decoding and return a negative result.
This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets
*/
@@ -153,7 +153,7 @@ int LZ4_decompress_fast_withPrefix64k (const char* source, char* dest, int outpu
static inline int LZ4_uncompress (const char* source, char* dest, int outputSize) { return LZ4_decompress_fast(source, dest, outputSize); }
static inline int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize) { return LZ4_decompress_safe(source, dest, isize, maxOutputSize); }
-/*
+/*
These functions are deprecated and should no longer be used.
They are provided here for compatibility with existing user programs.
*/