dibio.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under both the BSD-style license (found in the
  6. * LICENSE file in the root directory of this source tree) and the GPLv2 (found
  7. * in the COPYING file in the root directory of this source tree).
  8. * You may select, at your option, one of the above-listed licenses.
  9. */
  10. /* This library is designed for a single-threaded console application.
  11. * It exit() and printf() into stderr when it encounters an error condition. */
  12. #ifndef DIBIO_H_003
  13. #define DIBIO_H_003
  14. /*-*************************************
  15. * Dependencies
  16. ***************************************/
  17. #define ZDICT_STATIC_LINKING_ONLY
  18. #include "../lib/zdict.h" /* ZDICT_params_t */
  19. /*-*************************************
  20. * Public functions
  21. ***************************************/
  22. /*! DiB_trainFromFiles() :
  23. Train a dictionary from a set of files provided by `fileNamesTable`.
  24. Resulting dictionary is written into file `dictFileName`.
  25. `parameters` is optional and can be provided with values set to 0, meaning "default".
  26. @return : 0 == ok. Any other : error.
  27. */
  28. int DiB_trainFromFiles(const char* dictFileName, size_t maxDictSize,
  29. const char** fileNamesTable, int nbFiles, size_t chunkSize,
  30. ZDICT_legacy_params_t* params, ZDICT_cover_params_t* coverParams,
  31. ZDICT_fastCover_params_t* fastCoverParams, int optimize, unsigned memLimit);
  32. #endif