zstd/zlibWrapper/zstd_zlibwrapper.h

49 lines
1.2 KiB
C
Raw Normal View History

2016-08-30 17:04:33 +00:00
/**
* Copyright (c) 2016-present, Przemyslaw Skibinski, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#ifndef ZSTD_ZLIBWRAPPER_H
#define ZSTD_ZLIBWRAPPER_H
#if defined (__cplusplus)
extern "C" {
#endif
#define Z_PREFIX
#include <zlib.h>
2016-05-27 10:33:19 +00:00
#if !defined(z_const)
#if ZLIB_VERNUM >= 0x1260
2016-08-30 17:04:33 +00:00
#define z_const const
#else
#define z_const
#endif
2016-05-27 10:33:19 +00:00
#endif
2016-09-21 14:46:35 +00:00
/* enables/disables zstd compression during runtime */
void useZSTD(int turn_on);
2016-09-21 14:46:35 +00:00
/* check if zstd compression is turned on */
int isUsingZSTD(void);
2016-09-21 14:46:35 +00:00
/* returns a string with version of zstd library */
const char * zstdVersion(void);
2016-09-21 15:17:29 +00:00
/* Changes a pledged source size for a given compression stream.
2016-09-22 08:23:26 +00:00
It will change ZSTD compression parameters what may improve compression speed and/or ratio.
The function should be called just after deflateInit(). */
2016-09-21 14:46:35 +00:00
int ZSTD_setPledgedSrcSize(z_streamp strm, unsigned long long pledgedSrcSize);
#if defined (__cplusplus)
}
#endif
#endif /* ZSTD_ZLIBWRAPPER_H */