moved zbuff source files into lib/deprecated
This commit is contained in:
parent
8f8e2b0b4a
commit
825dffbc43
1
NEWS
1
NEWS
@ -9,6 +9,7 @@ API : changed : zbuff prototypes now generate deprecation warnings
|
|||||||
API : changed : streaming decompression implicit reset on starting new frame
|
API : changed : streaming decompression implicit reset on starting new frame
|
||||||
API : added experimental : dictID retrieval functions
|
API : added experimental : dictID retrieval functions
|
||||||
zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski
|
zlib_wrapper : added support for gz* functions, by Przemyslaw Skibinski
|
||||||
|
Changed : zbuff source files moved to lib/deprecated
|
||||||
Changed : reduced stack memory use
|
Changed : reduced stack memory use
|
||||||
|
|
||||||
v1.1.1
|
v1.1.1
|
||||||
|
@ -64,25 +64,25 @@ SET(Sources
|
|||||||
${LIBRARY_DIR}/common/fse_decompress.c
|
${LIBRARY_DIR}/common/fse_decompress.c
|
||||||
${LIBRARY_DIR}/compress/fse_compress.c
|
${LIBRARY_DIR}/compress/fse_compress.c
|
||||||
${LIBRARY_DIR}/compress/huf_compress.c
|
${LIBRARY_DIR}/compress/huf_compress.c
|
||||||
${LIBRARY_DIR}/compress/zbuff_compress.c
|
|
||||||
${LIBRARY_DIR}/compress/zstd_compress.c
|
${LIBRARY_DIR}/compress/zstd_compress.c
|
||||||
${LIBRARY_DIR}/decompress/huf_decompress.c
|
${LIBRARY_DIR}/decompress/huf_decompress.c
|
||||||
${LIBRARY_DIR}/decompress/zbuff_decompress.c
|
|
||||||
${LIBRARY_DIR}/decompress/zstd_decompress.c
|
${LIBRARY_DIR}/decompress/zstd_decompress.c
|
||||||
${LIBRARY_DIR}/dictBuilder/divsufsort.c
|
${LIBRARY_DIR}/dictBuilder/divsufsort.c
|
||||||
${LIBRARY_DIR}/dictBuilder/zdict.c)
|
${LIBRARY_DIR}/dictBuilder/zdict.c
|
||||||
|
${LIBRARY_DIR}/deprecated/zbuff_compress.c
|
||||||
|
${LIBRARY_DIR}/deprecated/zbuff_decompress.c)
|
||||||
|
|
||||||
SET(Headers
|
SET(Headers
|
||||||
|
${LIBRARY_DIR}/zstd.h
|
||||||
${LIBRARY_DIR}/common/bitstream.h
|
${LIBRARY_DIR}/common/bitstream.h
|
||||||
${LIBRARY_DIR}/common/error_private.h
|
${LIBRARY_DIR}/common/error_private.h
|
||||||
${LIBRARY_DIR}/common/zstd_errors.h
|
${LIBRARY_DIR}/common/zstd_errors.h
|
||||||
${LIBRARY_DIR}/common/fse.h
|
${LIBRARY_DIR}/common/fse.h
|
||||||
${LIBRARY_DIR}/common/huf.h
|
${LIBRARY_DIR}/common/huf.h
|
||||||
${LIBRARY_DIR}/common/mem.h
|
${LIBRARY_DIR}/common/mem.h
|
||||||
${LIBRARY_DIR}/common/zbuff.h
|
|
||||||
${LIBRARY_DIR}/common/zstd_internal.h
|
${LIBRARY_DIR}/common/zstd_internal.h
|
||||||
${LIBRARY_DIR}/zstd.h
|
${LIBRARY_DIR}/dictBuilder/zdict.h
|
||||||
${LIBRARY_DIR}/dictBuilder/zdict.h)
|
${LIBRARY_DIR}/deprecated/zbuff.h)
|
||||||
|
|
||||||
IF (ZSTD_LEGACY_SUPPORT)
|
IF (ZSTD_LEGACY_SUPPORT)
|
||||||
SET(LIBRARY_LEGACY_DIR ${LIBRARY_DIR}/legacy)
|
SET(LIBRARY_LEGACY_DIR ${LIBRARY_DIR}/legacy)
|
||||||
|
@ -50,9 +50,6 @@ ADD_EXECUTABLE(fuzzer ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/fuzzer.c)
|
|||||||
TARGET_LINK_LIBRARIES(fuzzer libzstd_static)
|
TARGET_LINK_LIBRARIES(fuzzer libzstd_static)
|
||||||
|
|
||||||
IF (UNIX)
|
IF (UNIX)
|
||||||
ADD_EXECUTABLE(zbufftest ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/zbufftest.c)
|
|
||||||
TARGET_LINK_LIBRARIES(zbufftest libzstd_static)
|
|
||||||
|
|
||||||
ADD_EXECUTABLE(paramgrill ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/paramgrill.c)
|
ADD_EXECUTABLE(paramgrill ${PROGRAMS_DIR}/datagen.c ${TESTS_DIR}/paramgrill.c)
|
||||||
TARGET_LINK_LIBRARIES(paramgrill libzstd_static m) #m is math library
|
TARGET_LINK_LIBRARIES(paramgrill libzstd_static m) #m is math library
|
||||||
|
|
||||||
|
26
lib/Makefile
26
lib/Makefile
@ -23,24 +23,22 @@ PREFIX ?= /usr/local
|
|||||||
LIBDIR ?= $(PREFIX)/lib
|
LIBDIR ?= $(PREFIX)/lib
|
||||||
INCLUDEDIR=$(PREFIX)/include
|
INCLUDEDIR=$(PREFIX)/include
|
||||||
|
|
||||||
CPPFLAGS= -I. -I./common -DXXH_NAMESPACE=XXH_
|
CPPFLAGS+= -I. -I./common -DXXH_NAMESPACE=ZSTD_
|
||||||
CFLAGS ?= -O3
|
CFLAGS ?= -O3
|
||||||
CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \
|
CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 \
|
||||||
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
|
-Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef \
|
||||||
-Wpointer-arith
|
-Wpointer-arith
|
||||||
FLAGS = $(CPPFLAGS) $(CFLAGS) $(MOREFLAGS)
|
CFLAGS += $(MOREFLAGS)
|
||||||
|
FLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
ZSTD_FILES := $(wildcard common/*.c compress/*.c decompress/*.c dictBuilder/*.c)
|
ZSTD_FILES := $(wildcard common/*.c compress/*.c decompress/*.c dictBuilder/*.c deprecated/*.c)
|
||||||
ZSTD_EXCLUDE := compress/zbuff_compress.c decompress/zbuff_decompress.c
|
|
||||||
ZSTD_FILES := $(filter-out $(ZSTD_EXCLUDE), $(ZSTD_FILES))
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(ZSTD_LEGACY_SUPPORT), 0)
|
ifeq ($(ZSTD_LEGACY_SUPPORT), 0)
|
||||||
CPPFLAGS += -DZSTD_LEGACY_SUPPORT=0
|
CPPFLAGS += -DZSTD_LEGACY_SUPPORT=0
|
||||||
else
|
else
|
||||||
ZSTD_FILES+= legacy/*.c
|
|
||||||
CPPFLAGS += -I./legacy -DZSTD_LEGACY_SUPPORT=1
|
CPPFLAGS += -I./legacy -DZSTD_LEGACY_SUPPORT=1
|
||||||
|
ZSTD_FILES+= $(wildcard legacy/*.c)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# OS X linker doesn't support -soname, and use different extension
|
# OS X linker doesn't support -soname, and use different extension
|
||||||
@ -90,8 +88,8 @@ libzstd : $(LIBZSTD)
|
|||||||
lib: libzstd.a libzstd
|
lib: libzstd.a libzstd
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(RM) -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc dll/libzstd.dll dll/libzstd.lib
|
@$(RM) core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc dll/libzstd.dll dll/libzstd.lib
|
||||||
@$(RM) -f decompress/*.o
|
@$(RM) decompress/*.o
|
||||||
@echo Cleaning library completed
|
@echo Cleaning library completed
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -116,7 +114,7 @@ install: libzstd.a libzstd libzstd.pc
|
|||||||
@install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
|
@install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
|
||||||
@install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
|
@install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
|
||||||
@install -m 644 common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h
|
@install -m 644 common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)/zstd_errors.h
|
||||||
@install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
|
@install -m 644 deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h # prototypes generate deprecation warnings
|
||||||
@install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
|
@install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
|
||||||
@echo zstd static and shared library installed
|
@echo zstd static and shared library installed
|
||||||
|
|
||||||
|
@ -56,15 +56,15 @@ file it should be linked with `dll\libzstd.dll`. For example:
|
|||||||
```
|
```
|
||||||
gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\libzstd.dll
|
gcc $(CFLAGS) -Iinclude/ test-dll.c -o test-dll dll\libzstd.dll
|
||||||
```
|
```
|
||||||
The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`.
|
The compiled executable will require ZSTD DLL which is available at `dll\libzstd.dll`.
|
||||||
|
|
||||||
|
|
||||||
#### Obsolete streaming API
|
#### Obsolete streaming API
|
||||||
|
|
||||||
Streaming is now provided within `zstd.h`.
|
Streaming is now provided within `zstd.h`.
|
||||||
Older streaming API is still available within `common/zbuff.h`.
|
Older streaming API is still available within `deprecated/zbuff.h`.
|
||||||
It is now deprecated, and will be removed in a future version.
|
It will be removed in a future version.
|
||||||
Consider migrating towards newer streaming API in `zstd.h`.
|
Consider migrating code towards newer streaming API in `zstd.h`.
|
||||||
|
|
||||||
|
|
||||||
#### Miscellaneous
|
#### Miscellaneous
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "error_private.h"
|
#include "error_private.h"
|
||||||
#define ZSTD_STATIC_LINKING_ONLY
|
#define ZSTD_STATIC_LINKING_ONLY
|
||||||
#include "zstd.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */
|
#include "zstd.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */
|
||||||
#include "zbuff.h" /* declaration of ZBUFF_isError, ZBUFF_getErrorName */
|
|
||||||
|
|
||||||
|
|
||||||
/*-****************************************
|
/*-****************************************
|
||||||
@ -44,16 +43,11 @@ ZSTD_ErrorCode ZSTD_getErrorCode(size_t code) { return ERR_getErrorCode(code); }
|
|||||||
* provides error code string from enum */
|
* provides error code string from enum */
|
||||||
const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorName(code); }
|
const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorName(code); }
|
||||||
|
|
||||||
|
/* --- ZBUFF Error Management (deprecated) --- */
|
||||||
/* **************************************************************
|
|
||||||
* ZBUFF Error Management
|
|
||||||
****************************************************************/
|
|
||||||
unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
|
unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
|
||||||
|
|
||||||
const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }
|
const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*=**************************************************************
|
/*=**************************************************************
|
||||||
* Custom allocator
|
* Custom allocator
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
@ -202,6 +202,7 @@ ZBUFF_DEPRECATED("use ZSTD_initDStream_usingDict") size_t ZBUFF_compressInit_adv
|
|||||||
const void* dict, size_t dictSize,
|
const void* dict, size_t dictSize,
|
||||||
ZSTD_parameters params, unsigned long long pledgedSrcSize);
|
ZSTD_parameters params, unsigned long long pledgedSrcSize);
|
||||||
|
|
||||||
|
|
||||||
#endif /* ZBUFF_STATIC_LINKING_ONLY */
|
#endif /* ZBUFF_STATIC_LINKING_ONLY */
|
||||||
|
|
||||||
|
|
@ -53,8 +53,6 @@ extern "C" {
|
|||||||
*********************************************************************************************************/
|
*********************************************************************************************************/
|
||||||
|
|
||||||
/*------ Version ------*/
|
/*------ Version ------*/
|
||||||
ZSTDLIB_API unsigned ZSTD_versionNumber (void); /**< returns version number of ZSTD */
|
|
||||||
|
|
||||||
#define ZSTD_VERSION_MAJOR 1
|
#define ZSTD_VERSION_MAJOR 1
|
||||||
#define ZSTD_VERSION_MINOR 1
|
#define ZSTD_VERSION_MINOR 1
|
||||||
#define ZSTD_VERSION_RELEASE 2
|
#define ZSTD_VERSION_RELEASE 2
|
||||||
@ -65,6 +63,7 @@ ZSTDLIB_API unsigned ZSTD_versionNumber (void); /**< returns version number of
|
|||||||
#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION)
|
#define ZSTD_VERSION_STRING ZSTD_EXPAND_AND_QUOTE(ZSTD_LIB_VERSION)
|
||||||
|
|
||||||
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
|
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
|
||||||
|
ZSTDLIB_API unsigned ZSTD_versionNumber (void);
|
||||||
|
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
|
@ -37,10 +37,10 @@ FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
|||||||
|
|
||||||
|
|
||||||
ZSTDCOMMON_FILES := $(ZSTDDIR)/common/*.c
|
ZSTDCOMMON_FILES := $(ZSTDDIR)/common/*.c
|
||||||
ZSTDCOMP_FILES := $(ZSTDDIR)/compress/zstd_compress.c $(ZSTDDIR)/compress/fse_compress.c $(ZSTDDIR)/compress/huf_compress.c
|
ZSTDCOMP_FILES := $(ZSTDDIR)/compress/*.c
|
||||||
ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/zstd_decompress.c $(ZSTDDIR)/decompress/huf_decompress.c
|
ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/*.c
|
||||||
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
|
ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
|
||||||
ZBUFF_FILES := $(ZSTDDIR)/compress/zbuff_compress.c $(ZSTDDIR)/decompress/zbuff_decompress.c
|
ZBUFF_FILES := $(ZSTDDIR)/deprecated/*.c
|
||||||
ZDICT_FILES := $(ZSTDDIR)/dictBuilder/*.c
|
ZDICT_FILES := $(ZSTDDIR)/dictBuilder/*.c
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ EXT =
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
VOID = /dev/null
|
VOID = /dev/null
|
||||||
ZBUFFTEST = -T2mn
|
ZSTREAM_TESTTIME = -T2mn
|
||||||
FUZZERTEST= -T5mn
|
FUZZERTEST= -T5mn
|
||||||
ZSTDRTTEST= --test-large-data
|
ZSTDRTTEST= --test-large-data
|
||||||
|
|
||||||
@ -61,9 +61,9 @@ ZSTDRTTEST= --test-large-data
|
|||||||
|
|
||||||
default: fullbench
|
default: fullbench
|
||||||
|
|
||||||
all: fullbench fuzzer zstreamtest paramgrill datagen
|
all: fullbench fuzzer zstreamtest paramgrill datagen zbufftest
|
||||||
|
|
||||||
all32: fullbench32 fuzzer32 zstreamtest32
|
all32: fullbench32 fuzzer32 zstreamtest32 zbufftest32
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -93,19 +93,21 @@ fullbench-dll: $(PRGDIR)/datagen.c fullbench.c
|
|||||||
$(MAKE) -C $(ZSTDDIR) libzstd
|
$(MAKE) -C $(ZSTDDIR) libzstd
|
||||||
$(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(ZSTDDIR)/dll/libzstd.dll
|
$(CC) $(FLAGS) $^ -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(ZSTDDIR)/dll/libzstd.dll
|
||||||
|
|
||||||
fuzzer : CPPFLAGS += -I$(ZSTDDIR)/dictBuilder
|
|
||||||
fuzzer : $(ZSTD_FILES) $(ZDICT_FILES) $(PRGDIR)/datagen.c fuzzer.c
|
fuzzer : $(ZSTD_FILES) $(ZDICT_FILES) $(PRGDIR)/datagen.c fuzzer.c
|
||||||
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
||||||
|
|
||||||
fuzzer32 : CPPFLAGS += -I$(ZSTDDIR)/dictBuilder
|
|
||||||
fuzzer32 : $(ZSTD_FILES) $(ZDICT_FILES) $(PRGDIR)/datagen.c fuzzer.c
|
fuzzer32 : $(ZSTD_FILES) $(ZDICT_FILES) $(PRGDIR)/datagen.c fuzzer.c
|
||||||
$(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
|
$(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
|
||||||
|
|
||||||
zbufftest : $(ZSTD_FILES) $(ZBUFF_FILES) $(PRGDIR)/datagen.c zbufftest.c
|
zbufftest : CPPFLAGS += -I$(ZSTDDIR)/deprecated
|
||||||
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
zbufftest : CFLAGS += -Wno-deprecated-declarations
|
||||||
|
zbufftest : $(ZSTD_FILES) $(ZBUFF_FILES) $(PRGDIR)/datagen.c zbufftest.c
|
||||||
|
$(CC) $(FLAGS) $^ -o $@$(EXT) # flag required to silence deprecation warnings
|
||||||
|
|
||||||
zbufftest32 : $(ZSTD_FILES) $(ZBUFF_FILES) $(PRGDIR)/datagen.c zbufftest.c
|
zbufftest32 : CPPFLAGS += -I$(ZSTDDIR)/deprecated
|
||||||
$(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
|
zbufftest32 : CFLAGS += -Wno-deprecated-declarations -m32
|
||||||
|
zbufftest32 : $(ZSTD_FILES) $(ZBUFF_FILES) $(PRGDIR)/datagen.c zbufftest.c
|
||||||
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
||||||
|
|
||||||
zstreamtest : $(ZSTD_FILES) $(PRGDIR)/datagen.c zstreamtest.c
|
zstreamtest : $(ZSTD_FILES) $(PRGDIR)/datagen.c zstreamtest.c
|
||||||
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
||||||
@ -224,15 +226,15 @@ test-fuzzer32: fuzzer32
|
|||||||
$(QEMU_SYS) ./fuzzer32 $(FUZZERTEST)
|
$(QEMU_SYS) ./fuzzer32 $(FUZZERTEST)
|
||||||
|
|
||||||
test-zbuff: zbufftest
|
test-zbuff: zbufftest
|
||||||
$(QEMU_SYS) ./zbufftest $(ZBUFFTEST)
|
$(QEMU_SYS) ./zbufftest $(ZSTREAM_TESTTIME)
|
||||||
|
|
||||||
test-zbuff32: zbufftest32
|
test-zbuff32: zbufftest32
|
||||||
$(QEMU_SYS) ./zbufftest32 $(ZBUFFTEST)
|
$(QEMU_SYS) ./zbufftest32 $(ZSTREAM_TESTTIME)
|
||||||
|
|
||||||
test-zstream: zstreamtest
|
test-zstream: zstreamtest
|
||||||
$(QEMU_SYS) ./zstreamtest $(ZBUFFTEST)
|
$(QEMU_SYS) ./zstreamtest $(ZSTREAM_TESTTIME)
|
||||||
|
|
||||||
test-zstream32: zstreamtest32
|
test-zstream32: zstreamtest32
|
||||||
$(QEMU_SYS) ./zstreamtest32 $(ZBUFFTEST)
|
$(QEMU_SYS) ./zstreamtest32 $(ZSTREAM_TESTTIME)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user