summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-04-03 19:34:15 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-04-03 19:34:15 (GMT)
commitee1c2819476deb4865527e363bd5e773ec5b0ea1 (patch)
treed4ff9bc9ec75a8a02308d33ce07600276a81cef1
parentfd281f8e5d8822b0f2178d63c80315869c42cc58 (diff)
downloadlz4-ee1c2819476deb4865527e363bd5e773ec5b0ea1.zip
lz4-ee1c2819476deb4865527e363bd5e773ec5b0ea1.tar.gz
lz4-ee1c2819476deb4865527e363bd5e773ec5b0ea1.tar.bz2
Corrected : minor : changed a macro name to avoid duplicate within NetBSD. Thanks Gray for reporting (Issue 15)
git-svn-id: https://lz4.googlecode.com/svn/trunk@61 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
-rw-r--r--lz4.c8
-rw-r--r--lz4.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/lz4.c b/lz4.c
index 952d58d..21aa1c4 100644
--- a/lz4.c
+++ b/lz4.c
@@ -106,9 +106,9 @@
#endif
#ifdef _MSC_VER
-#define bswap16(x) _byteswap_ushort(x)
+#define lz4_bswap16(x) _byteswap_ushort(x)
#else
-#define bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)))
+#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)))
#endif
#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__)
@@ -214,8 +214,8 @@ typedef struct _U64_S { U64 v; } U64_S;
#endif
#if (defined(LZ4_BIG_ENDIAN) && !defined(BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE))
-#define LZ4_READ_LITTLEENDIAN_16(d,s,p) { U16 v = A16(p); v = bswap16(v); d = (s) - v; }
-#define LZ4_WRITE_LITTLEENDIAN_16(p,i) { U16 v = (U16)(i); v = bswap16(v); A16(p) = v; p+=2; }
+#define LZ4_READ_LITTLEENDIAN_16(d,s,p) { U16 v = A16(p); v = lz4_bswap16(v); d = (s) - v; }
+#define LZ4_WRITE_LITTLEENDIAN_16(p,i) { U16 v = (U16)(i); v = lz4_bswap16(v); A16(p) = v; p+=2; }
#else // Little Endian
#define LZ4_READ_LITTLEENDIAN_16(d,s,p) { d = (s) - A16(p); }
#define LZ4_WRITE_LITTLEENDIAN_16(p,v) { A16(p) = v; p+=2; }
diff --git a/lz4.h b/lz4.h
index 1061fdf..2006363 100644
--- a/lz4.h
+++ b/lz4.h
@@ -43,6 +43,7 @@ int LZ4_uncompress (const char* source, char* dest, int osize);
/*
LZ4_compress() :
+ isize : is the input size. Max supported value is ~1.9GB
return : the number of bytes written in buffer dest
or 0 if the compression fails (if LZ4_COMPRESSMIN is set)
note : destination buffer must be already allocated.
@@ -69,7 +70,7 @@ 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.
- isize : is the input size
+ 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)
*/