Export functions related to dictionary compression from DLL

This commit is contained in:
Alexander Borzunov
2016-08-18 16:12:49 +05:00
parent 79d9cdd258
commit 1f48382b1a
2 changed files with 17 additions and 4 deletions
+16 -3
View File
@@ -38,6 +38,19 @@
extern "C" {
#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 ZSTDLIB_API __declspec(dllexport)
#else
# define ZSTDLIB_API
#endif
/*! ZDICT_trainFromBuffer() :
Train a dictionary from an array of samples.
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.
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,
ZSTDLIB_API size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity,
const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);
/*====== Helper functions ======*/
unsigned ZDICT_isError(size_t errorCode);
const char* ZDICT_getErrorName(size_t errorCode);
ZSTDLIB_API unsigned ZDICT_isError(size_t errorCode);
ZSTDLIB_API const char* ZDICT_getErrorName(size_t errorCode);