[1.5.0] Move zstd_errors.h and zdict.h to lib/ root
`zstd_errors.h` and `zdict.h` are public headers, so they deserve to be in the root `lib/` directory with `zstd.h`, not mixed in with our private headers.
This commit is contained in:
@@ -65,9 +65,7 @@ cxx_library(
|
||||
name='zdict',
|
||||
header_namespace='',
|
||||
visibility=['PUBLIC'],
|
||||
exported_headers=subdir_glob([
|
||||
('dictBuilder', 'zdict.h'),
|
||||
]),
|
||||
exported_headers=['zdict.h'],
|
||||
headers=subdir_glob([
|
||||
('dictBuilder', 'divsufsort.h'),
|
||||
('dictBuilder', 'cover.h'),
|
||||
@@ -131,10 +129,10 @@ cxx_library(
|
||||
name='errors',
|
||||
header_namespace='',
|
||||
visibility=['PUBLIC'],
|
||||
exported_headers=subdir_glob([
|
||||
('common', 'error_private.h'),
|
||||
('common', 'zstd_errors.h'),
|
||||
]),
|
||||
exported_headers=[
|
||||
'zstd_errors.h',
|
||||
'common/error_private.h',
|
||||
]
|
||||
srcs=['common/error_private.c'],
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -435,8 +435,8 @@ install-includes:
|
||||
[ -e $(DESTDIR)$(INCLUDEDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
|
||||
@echo Installing includes
|
||||
$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
|
||||
$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
|
||||
$(INSTALL_DATA) dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)
|
||||
$(INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
|
||||
$(INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR)
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ Zstandard's stable API is exposed within [lib/zstd.h](zstd.h).
|
||||
|
||||
Optional advanced features are exposed via :
|
||||
|
||||
- `lib/common/zstd_errors.h` : translates `size_t` function results
|
||||
into a `ZSTD_ErrorCode`, for accurate error handling.
|
||||
- `lib/zstd_errors.h` : translates `size_t` function results
|
||||
into a `ZSTD_ErrorCode`, for accurate error handling.
|
||||
|
||||
- `ZSTD_STATIC_LINKING_ONLY` : if this macro is defined _before_ including `zstd.h`,
|
||||
it unlocks access to the experimental API,
|
||||
|
||||
@@ -21,8 +21,8 @@ extern "C" {
|
||||
/* ****************************************
|
||||
* Dependencies
|
||||
******************************************/
|
||||
#include "zstd_deps.h" /* size_t */
|
||||
#include "zstd_errors.h" /* enum list */
|
||||
#include "../zstd_errors.h" /* enum list */
|
||||
#include "zstd_deps.h" /* size_t */
|
||||
|
||||
|
||||
/* ****************************************
|
||||
|
||||
@@ -26,15 +26,16 @@
|
||||
#include <string.h> /* memset */
|
||||
#include <time.h> /* clock */
|
||||
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
# define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
|
||||
#include "../common/mem.h" /* read */
|
||||
#include "../common/pool.h"
|
||||
#include "../common/threading.h"
|
||||
#include "cover.h"
|
||||
#include "../common/zstd_internal.h" /* includes zstd.h */
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
#define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
#include "zdict.h"
|
||||
#include "../zdict.h"
|
||||
#include "cover.h"
|
||||
|
||||
/*-*************************************
|
||||
* Constants
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
* You may select, at your option, one of the above-listed licenses.
|
||||
*/
|
||||
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
# define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
|
||||
#include <stdio.h> /* fprintf */
|
||||
#include <stdlib.h> /* malloc, free, qsort */
|
||||
#include <string.h> /* memset */
|
||||
@@ -16,10 +20,7 @@
|
||||
#include "../common/pool.h"
|
||||
#include "../common/threading.h"
|
||||
#include "../common/zstd_internal.h" /* includes zstd.h */
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
#define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
#include "zdict.h"
|
||||
#include "../zdict.h"
|
||||
|
||||
/**
|
||||
* COVER_best_t is used for two purposes:
|
||||
|
||||
@@ -16,16 +16,17 @@
|
||||
#include <string.h> /* memset */
|
||||
#include <time.h> /* clock */
|
||||
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
# define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
|
||||
#include "../common/mem.h" /* read */
|
||||
#include "../common/pool.h"
|
||||
#include "../common/threading.h"
|
||||
#include "cover.h"
|
||||
#include "../common/zstd_internal.h" /* includes zstd.h */
|
||||
#include "../compress/zstd_compress_internal.h" /* ZSTD_hash*() */
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
#define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
#include "zdict.h"
|
||||
#include "../zdict.h"
|
||||
#include "cover.h"
|
||||
|
||||
|
||||
/*-*************************************
|
||||
|
||||
@@ -41,18 +41,19 @@
|
||||
#include <stdio.h> /* fprintf, fopen, ftello64 */
|
||||
#include <time.h> /* clock */
|
||||
|
||||
#include "../common/mem.h" /* read */
|
||||
#include "../common/fse.h" /* FSE_normalizeCount, FSE_writeNCount */
|
||||
#define HUF_STATIC_LINKING_ONLY
|
||||
#include "../common/huf.h" /* HUF_buildCTable, HUF_writeCTable */
|
||||
#include "../common/zstd_internal.h" /* includes zstd.h */
|
||||
#include "../common/xxhash.h" /* XXH64 */
|
||||
#include "divsufsort.h"
|
||||
#ifndef ZDICT_STATIC_LINKING_ONLY
|
||||
# define ZDICT_STATIC_LINKING_ONLY
|
||||
#endif
|
||||
#include "zdict.h"
|
||||
#define HUF_STATIC_LINKING_ONLY
|
||||
|
||||
#include "../common/mem.h" /* read */
|
||||
#include "../common/fse.h" /* FSE_normalizeCount, FSE_writeNCount */
|
||||
#include "../common/huf.h" /* HUF_buildCTable, HUF_writeCTable */
|
||||
#include "../common/zstd_internal.h" /* includes zstd.h */
|
||||
#include "../common/xxhash.h" /* XXH64 */
|
||||
#include "../compress/zstd_compress_internal.h" /* ZSTD_loadCEntropy() */
|
||||
#include "../zdict.h"
|
||||
#include "divsufsort.h"
|
||||
|
||||
|
||||
/*-*************************************
|
||||
|
||||
+4
-4
@@ -815,7 +815,7 @@ ZSTDLIB_API size_t ZSTD_DStreamOutSize(void); /*!< recommended size for output
|
||||
/*! ZSTD_compress_usingDict() :
|
||||
* Compression at an explicit compression level using a Dictionary.
|
||||
* A dictionary can be any arbitrary data segment (also called a prefix),
|
||||
* or a buffer with specified information (see dictBuilder/zdict.h).
|
||||
* or a buffer with specified information (see zdict.h).
|
||||
* Note : This function loads the dictionary, resulting in significant startup delay.
|
||||
* It's intended for a dictionary used only once.
|
||||
* Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used. */
|
||||
@@ -1845,7 +1845,7 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* pre
|
||||
|
||||
/* ZSTD_c_splitBlocks
|
||||
* Default is 0 == disabled. Set to 1 to enable block splitting.
|
||||
*
|
||||
*
|
||||
* Will attempt to split blocks in order to improve compression ratio at the cost of speed.
|
||||
*/
|
||||
#define ZSTD_c_splitBlocks ZSTD_c_experimentalParam13
|
||||
@@ -1853,11 +1853,11 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* pre
|
||||
/* ZSTD_c_useRowMatchFinder
|
||||
* Default is ZSTD_urm_auto.
|
||||
* Controlled with ZSTD_useRowMatchFinderMode_e enum.
|
||||
*
|
||||
*
|
||||
* By default, in ZSTD_urm_auto, when finalizing the compression parameters, the library
|
||||
* will decide at runtime whether to use the row-based matchfinder based on support for SIMD
|
||||
* instructions as well as the windowLog.
|
||||
*
|
||||
*
|
||||
* Set to ZSTD_urm_disableRowMatchFinder to never use row-based matchfinder.
|
||||
* Set to ZSTD_urm_enableRowMatchFinder to force usage of row-based matchfinder.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user