summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2016-06-29 16:18:34 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2016-06-29 16:18:34 (GMT)
commit19e585cc462759427f8d125fca3278b8762b3099 (patch)
tree5b73b6b0f05e2f579deeecc0abbdb85c05b4ef9b /lib
parent6b1600f41e039639b24f7780db8f1c26b28b1b6b (diff)
downloadlz4-19e585cc462759427f8d125fca3278b8762b3099.zip
lz4-19e585cc462759427f8d125fca3278b8762b3099.tar.gz
lz4-19e585cc462759427f8d125fca3278b8762b3099.tar.bz2
modified : some more deprecated functions from lz4hc.h generate warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.h5
-rw-r--r--lib/lz4hc.h59
2 files changed, 35 insertions, 29 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index e173e81..9146178 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -32,7 +32,8 @@
- LZ4 homepage : http://www.lz4.org
- LZ4 source repository : https://github.com/Cyan4973/lz4
*/
-#pragma once
+#ifndef LZ4_H_2983827168210
+#define LZ4_H_2983827168210
#if defined (__cplusplus)
extern "C" {
@@ -360,3 +361,5 @@ LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress
#if defined (__cplusplus)
}
#endif
+
+#endif /* LZ4_H_2983827168210 */
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index 431f7c8..da40e05 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -31,45 +31,44 @@
- LZ4 source repository : https://github.com/Cyan4973/lz4
- LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
*/
-#pragma once
+#ifndef LZ4_HC_H_19834876238432
+#define LZ4_HC_H_19834876238432
#if defined (__cplusplus)
extern "C" {
#endif
-/*****************************
+/*-***************************
* Includes
*****************************/
#include <stddef.h> /* size_t */
-/**************************************
+/*-************************************
* Block Compression
**************************************/
-int LZ4_compress_HC (const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel);
-/*
-LZ4_compress_HC :
- Destination buffer 'dst' must be already allocated.
- Compression completion is guaranteed if 'dst' buffer is sized to handle worst circumstances (data not compressible)
+/*!
+LZ4_compress_HC() :
+ Destination buffer `dst` must be already allocated.
+ Compression success is guaranteed if `dst` buffer is sized to handle worst circumstances (data not compressible)
Worst size evaluation is provided by function LZ4_compressBound() (see "lz4.h")
- srcSize : Max supported value is LZ4_MAX_INPUT_SIZE (see "lz4.h")
- compressionLevel : Recommended values are between 4 and 9, although any value between 0 and 16 will work.
- 0 means "use default value" (see lz4hc.c).
- Values >16 behave the same as 16.
- return : the number of bytes written into buffer 'dst'
- or 0 if compression fails.
+ `srcSize` : Max supported value is LZ4_MAX_INPUT_SIZE (see "lz4.h")
+ `compressionLevel` : Recommended values are between 4 and 9, although any value between 0 and 16 will work.
+ 0 means "use default value" (see lz4hc.c).
+ Values >16 behave the same as 16.
+ @return : the number of bytes written into buffer 'dst'
+ or 0 if compression fails.
*/
+int LZ4_compress_HC (const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel);
/* Note :
- Decompression functions are provided within LZ4 source code (see "lz4.h") (BSD license)
+ Decompression functions are provided within "lz4.h" (BSD license)
*/
-int LZ4_sizeofStateHC(void);
-int LZ4_compress_HC_extStateHC(void* state, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel);
-/*
+/*!
LZ4_compress_HC_extStateHC() :
Use this function if you prefer to manually allocate memory for compression tables.
To know how much memory must be allocated for the compression tables, use :
@@ -81,9 +80,11 @@ LZ4_compress_HC_extStateHC() :
LZ4_compress_HC_extStateHC() is equivalent to previously described function.
It just uses externally allocated memory for stateHC.
*/
+int LZ4_compress_HC_extStateHC(void* state, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel);
+int LZ4_sizeofStateHC(void);
-/**************************************
+/*-************************************
* Streaming Compression
**************************************/
#define LZ4_STREAMHCSIZE 262192
@@ -137,7 +138,7 @@ int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSi
-/**************************************
+/*-************************************
* Deprecated Functions
**************************************/
/* Deprecate Warnings */
@@ -159,22 +160,22 @@ int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSi
# pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler")
# define LZ4_DEPRECATED(message)
# endif
-#endif // LZ4_DEPRECATE_WARNING_DEFBLOCK
+#endif /* LZ4_DEPRECATE_WARNING_DEFBLOCK */
-/* compression functions */
-/* these functions are planned to trigger warning messages by r131 approximately */
+/* deprecated compression functions */
+/* these functions will trigger warning messages in future releases */
int LZ4_compressHC (const char* source, char* dest, int inputSize);
int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize);
-int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel);
-int LZ4_compressHC2_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel);
+LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel);
+LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel);
int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize);
int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
-int LZ4_compressHC2_withStateHC (void* state, const char* source, char* dest, int inputSize, int compressionLevel);
-int LZ4_compressHC2_limitedOutput_withStateHC(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel);
+LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_withStateHC (void* state, const char* source, char* dest, int inputSize, int compressionLevel);
+LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_limitedOutput_withStateHC(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel);
int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize);
int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize);
-/* Streaming functions following the older model; should no longer be used */
+/* Deprecated Streaming functions using older model; should no longer be used */
LZ4_DEPRECATED("use LZ4_createStreamHC() instead") void* LZ4_createHC (char* inputBuffer);
LZ4_DEPRECATED("use LZ4_saveDictHC() instead") char* LZ4_slideInputBufferHC (void* LZ4HC_Data);
LZ4_DEPRECATED("use LZ4_freeStreamHC() instead") int LZ4_freeHC (void* LZ4HC_Data);
@@ -187,3 +188,5 @@ LZ4_DEPRECATED("use LZ4_resetStreamHC() instead") int LZ4_resetStreamStateHC(
#if defined (__cplusplus)
}
#endif
+
+#endif /* LZ4_HC_H_19834876238432 */