From 5540f4f93e32c925b581d8778f5636a23479b845 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 29 Jun 2016 20:25:10 +0200 Subject: stronger compilation flags --- lib/lz4hc.h | 8 ++++---- programs/Makefile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/lz4hc.h b/lib/lz4hc.h index da40e05..fce2213 100644 --- a/lib/lz4hc.h +++ b/lib/lz4hc.h @@ -100,15 +100,15 @@ typedef struct { size_t table[LZ4_STREAMHCSIZE_SIZET]; } LZ4_streamHC_t; */ -LZ4_streamHC_t* LZ4_createStreamHC(void); -int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); -/* +/*! LZ4_createStreamHC() and LZ4_freeStreamHC() : These functions create and release memory for LZ4 HC streaming state. Newly created states are already initialized. Existing state space can be re-used anytime using LZ4_resetStreamHC(). If you use LZ4 as a DLL, use these functions instead of static structure allocation, to avoid size mismatch between different versions. */ +LZ4_streamHC_t* LZ4_createStreamHC(void); +int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); void LZ4_resetStreamHC (LZ4_streamHC_t* streamHCPtr, int compressionLevel); int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); @@ -120,7 +120,7 @@ int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSi /* These functions compress data in successive blocks of any size, using previous blocks as dictionary. One key assumption is that previous blocks (up to 64 KB) remain read-accessible while compressing next blocks. - There is an exception for ring buffers, which can be smaller 64 KB. + There is an exception for ring buffers, which can be smaller than 64 KB. Such case is automatically detected and correctly handled by LZ4_compress_HC_continue(). Before starting compression, state must be properly initialized, using LZ4_resetStreamHC(). diff --git a/programs/Makefile b/programs/Makefile index 6ee2f58..c67fbeb 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -1,6 +1,6 @@ # ########################################################################## # LZ4 programs - Makefile -# Copyright (C) Yann Collet 2011-2015 +# Copyright (C) Yann Collet 2011-2016 # # GPL v2 License # @@ -19,8 +19,8 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # You can contact the author at : +# - LZ4 homepage : http://www.lz4.org # - LZ4 source repository : https://github.com/Cyan4973/lz4 -# - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c # ########################################################################## # lz4 : Command Line Utility, supporting gzip-like arguments # lz4c : CLU, supporting also legacy lz4demo arguments @@ -42,8 +42,8 @@ LZ4DIR := ../lib DESTDIR ?= PREFIX ?= /usr/local -CFLAGS ?= -O3 # can select customized optimized flags such as for example : CFLAGS="-O2 -g" make -CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -pedantic +CFLAGS ?= -O3 # can select custom flags. For example : CFLAGS="-O2 -g" make +CFLAGS += -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes # -Wstrict-aliasing=1 CPPFLAGS:= -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_ -DLZ4_VERSION=\"$(RELEASE)\" FLAGS := $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -- cgit v0.12