Merge pull request #297 from borzunov/dev
Export functions related to dictionary compression from DLL
This commit is contained in:
commit
a5dbf9f629
@ -38,6 +38,19 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*====== Export for Windows ======*/
|
||||||
|
/*!
|
||||||
|
* ZSTD_DLL_EXPORT :
|
||||||
|
* Enable exporting of functions when building a Windows DLL
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
|
||||||
|
# define ZDICTLIB_API __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
# define ZDICTLIB_API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*! ZDICT_trainFromBuffer() :
|
/*! ZDICT_trainFromBuffer() :
|
||||||
Train a dictionary from an array of samples.
|
Train a dictionary from an array of samples.
|
||||||
Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
|
Samples must be stored concatenated in a single flat buffer `samplesBuffer`,
|
||||||
@ -50,13 +63,13 @@ extern "C" {
|
|||||||
In general, it's recommended to provide a few thousands samples, but this can vary a lot.
|
In general, it's recommended to provide a few thousands samples, but this can vary a lot.
|
||||||
It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
|
It's recommended that total size of all samples be about ~x100 times the target size of dictionary.
|
||||||
*/
|
*/
|
||||||
size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
|
ZDICTLIB_API size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
|
||||||
const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);
|
const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);
|
||||||
|
|
||||||
|
|
||||||
/*====== Helper functions ======*/
|
/*====== Helper functions ======*/
|
||||||
unsigned ZDICT_isError(size_t errorCode);
|
ZDICTLIB_API unsigned ZDICT_isError(size_t errorCode);
|
||||||
const char* ZDICT_getErrorName(size_t errorCode);
|
ZDICTLIB_API const char* ZDICT_getErrorName(size_t errorCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ ZSTDLIB_API size_t ZSTD_compress( void* dst, size_t dstCapacity,
|
|||||||
* Always ensure result fits within application's authorized limits !
|
* Always ensure result fits within application's authorized limits !
|
||||||
* Each application can set its own limits.
|
* Each application can set its own limits.
|
||||||
* note 4 : when `return==0`, if precise failure cause is needed, use ZSTD_getFrameParams() to know more. */
|
* note 4 : when `return==0`, if precise failure cause is needed, use ZSTD_getFrameParams() to know more. */
|
||||||
unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize);
|
ZSTDLIB_API unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize);
|
||||||
|
|
||||||
/*! ZSTD_decompress() :
|
/*! ZSTD_decompress() :
|
||||||
`compressedSize` : must be the _exact_ size of compressed input, otherwise decompression will fail.
|
`compressedSize` : must be the _exact_ size of compressed input, otherwise decompression will fail.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user