renamed zstd_compress.h into zstd_compress_internal.h

to emphasize the fact that all definitions it contains
must remain private, accross lib/compress modules.
dev
Yann Collet 2017-11-07 16:15:23 -08:00
parent 8b6aecf2cb
commit ee441d5d2b
12 changed files with 22 additions and 14 deletions

View File

@ -26,7 +26,7 @@
#include "fse.h" #include "fse.h"
#define HUF_STATIC_LINKING_ONLY #define HUF_STATIC_LINKING_ONLY
#include "huf.h" #include "huf.h"
#include "zstd_compress.h" #include "zstd_compress_internal.h"
#include "zstd_fast.h" #include "zstd_fast.h"
#include "zstd_double_fast.h" #include "zstd_double_fast.h"
#include "zstd_lazy.h" #include "zstd_lazy.h"

View File

@ -9,7 +9,7 @@
*/ */
/* This header contains definitions /* This header contains definitions
* that shall only be used by modules from within lib/compress. * that shall **only** be used by modules within lib/compress.
*/ */
#ifndef ZSTD_COMPRESS_H #ifndef ZSTD_COMPRESS_H

View File

@ -8,6 +8,7 @@
* You may select, at your option, one of the above-listed licenses. * You may select, at your option, one of the above-listed licenses.
*/ */
#include "zstd_compress_internal.h"
#include "zstd_double_fast.h" #include "zstd_double_fast.h"

View File

@ -11,12 +11,13 @@
#ifndef ZSTD_DOUBLE_FAST_H #ifndef ZSTD_DOUBLE_FAST_H
#define ZSTD_DOUBLE_FAST_H #define ZSTD_DOUBLE_FAST_H
#include "zstd_compress.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {
#endif #endif
#include "mem.h" /* U32 */
#include "zstd.h" /* ZSTD_CCtx, size_t */
void ZSTD_fillDoubleHashTable(ZSTD_CCtx* cctx, const void* end, const U32 mls); void ZSTD_fillDoubleHashTable(ZSTD_CCtx* cctx, const void* end, const U32 mls);
size_t ZSTD_compressBlock_doubleFast(ZSTD_CCtx* ctx, const void* src, size_t srcSize); size_t ZSTD_compressBlock_doubleFast(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
size_t ZSTD_compressBlock_doubleFast_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize); size_t ZSTD_compressBlock_doubleFast_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);

View File

@ -8,6 +8,7 @@
* You may select, at your option, one of the above-listed licenses. * You may select, at your option, one of the above-listed licenses.
*/ */
#include "zstd_compress_internal.h"
#include "zstd_fast.h" #include "zstd_fast.h"

View File

@ -11,12 +11,13 @@
#ifndef ZSTD_FAST_H #ifndef ZSTD_FAST_H
#define ZSTD_FAST_H #define ZSTD_FAST_H
#include "zstd_compress.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {
#endif #endif
#include "mem.h" /* U32 */
#include "zstd.h" /* ZSTD_CCtx, size_t */
void ZSTD_fillHashTable(ZSTD_CCtx* zc, const void* end, const U32 mls); void ZSTD_fillHashTable(ZSTD_CCtx* zc, const void* end, const U32 mls);
size_t ZSTD_compressBlock_fast(ZSTD_CCtx* ctx, size_t ZSTD_compressBlock_fast(ZSTD_CCtx* ctx,
const void* src, size_t srcSize); const void* src, size_t srcSize);

View File

@ -8,6 +8,7 @@
* You may select, at your option, one of the above-listed licenses. * You may select, at your option, one of the above-listed licenses.
*/ */
#include "zstd_compress_internal.h"
#include "zstd_lazy.h" #include "zstd_lazy.h"

View File

@ -11,12 +11,13 @@
#ifndef ZSTD_LAZY_H #ifndef ZSTD_LAZY_H
#define ZSTD_LAZY_H #define ZSTD_LAZY_H
#include "zstd_compress.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {
#endif #endif
#include "mem.h" /* U32 */
#include "zstd.h" /* ZSTD_CCtx, size_t */
U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls); U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls);
void ZSTD_updateTree(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls); void ZSTD_updateTree(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls);
void ZSTD_updateTree_extDict(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls); void ZSTD_updateTree_extDict(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls);

View File

@ -10,12 +10,13 @@
#ifndef ZSTD_LDM_H #ifndef ZSTD_LDM_H
#define ZSTD_LDM_H #define ZSTD_LDM_H
#include "zstd_compress.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {
#endif #endif
#include "zstd_compress_internal.h" /* ldmParams_t, U32 */
#include "zstd.h" /* ZSTD_CCtx, size_t */
/*-************************************* /*-*************************************
* Long distance matching * Long distance matching
***************************************/ ***************************************/

View File

@ -8,8 +8,9 @@
* You may select, at your option, one of the above-listed licenses. * You may select, at your option, one of the above-listed licenses.
*/ */
#include "zstd_compress_internal.h"
#include "zstd_opt.h" #include "zstd_opt.h"
#include "zstd_lazy.h" #include "zstd_lazy.h" /* ZSTD_updateTree, ZSTD_updateTree_extDict */
#define ZSTD_LITFREQ_ADD 2 #define ZSTD_LITFREQ_ADD 2

View File

@ -11,12 +11,12 @@
#ifndef ZSTD_OPT_H #ifndef ZSTD_OPT_H
#define ZSTD_OPT_H #define ZSTD_OPT_H
#include "zstd_compress.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {
#endif #endif
#include "zstd.h" /* ZSTD_CCtx, size_t */
size_t ZSTD_compressBlock_btopt(ZSTD_CCtx* ctx, const void* src, size_t srcSize); size_t ZSTD_compressBlock_btopt(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
size_t ZSTD_compressBlock_btultra(ZSTD_CCtx* ctx, const void* src, size_t srcSize); size_t ZSTD_compressBlock_btultra(ZSTD_CCtx* ctx, const void* src, size_t srcSize);

View File

@ -24,7 +24,7 @@
#include <string.h> /* memcpy, memset */ #include <string.h> /* memcpy, memset */
#include "pool.h" /* threadpool */ #include "pool.h" /* threadpool */
#include "threading.h" /* mutex */ #include "threading.h" /* mutex */
#include "zstd_compress.h" /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */ #include "zstd_compress_internal.h" /* MIN, ERROR, ZSTD_*, ZSTD_highbit32 */
#include "zstdmt_compress.h" #include "zstdmt_compress.h"