/**
* \file zstd.c
* Single-file Zstandard library.
- *
+ *
* Generate using:
* \code
* combine.sh -r ../../lib -r ../../lib/common -r ../../lib/compress -r ../../lib/decompress -k zstd.h -o zstd.c zstd-in.c
*/
/*
* Settings to bake for the single library file.
- *
+ *
* Note: It's important that none of these affects 'zstd.h' (only the
* implementation files we're amalgamating).
- *
+ *
* Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
* defined in mem.h (breaking C99 compatibility).
- *
+ *
+ * Note: the undefs for xxHash allow Zstd's implementation to coinside with with
+ * standalone xxHash usage (with global defines).
+ *
* Note: multithreading is enabled for all platforms apart from Emscripten.
*/
#define DEBUGLEVEL 0
#define MEM_MODULE
+#undef XXH_NAMESPACE
#define XXH_NAMESPACE ZSTD_
+#undef XXH_PRIVATE_API
#define XXH_PRIVATE_API
+#undef XXH_INLINE_ALL
#define XXH_INLINE_ALL
#define ZSTD_LEGACY_SUPPORT 0
#define ZSTD_LIB_DICTBUILDER 0
#define ZSTD_MULTITHREAD
#endif
-/* common */
+/* lib/common */
#include "debug.c"
#include "entropy_common.c"
#include "error_private.c"
#include "fse_decompress.c"
#include "threading.c"
#include "pool.c"
-#include "xxhash.c"
#include "zstd_common.c"
-/* compress */
+/* lib/compress */
#include "fse_compress.c"
#include "hist.c"
#include "huf_compress.c"
#include "zstdmt_compress.c"
#endif
-/* decompress */
+/* lib/decompress */
#include "huf_decompress.c"
#include "zstd_ddict.c"
#include "zstd_decompress.c"
/**
* \file zstddeclib.c
* Single-file Zstandard decompressor.
- *
+ *
* Generate using:
* \code
* combine.sh -r ../../lib -r ../../lib/common -r ../../lib/decompress -o zstddeclib.c zstddeclib-in.c
*/
/*
* Settings to bake for the standalone decompressor.
- *
+ *
* Note: It's important that none of these affects 'zstd.h' (only the
* implementation files we're amalgamating).
- *
+ *
* Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
* defined in mem.h (breaking C99 compatibility).
+ *
+ * Note: the undefs for xxHash allow Zstd's implementation to coinside with with
+ * standalone xxHash usage (with global defines).
*/
#define DEBUGLEVEL 0
#define MEM_MODULE
+#undef XXH_NAMESPACE
#define XXH_NAMESPACE ZSTD_
+#undef XXH_PRIVATE_API
#define XXH_PRIVATE_API
+#undef XXH_INLINE_ALL
#define XXH_INLINE_ALL
#define ZSTD_LEGACY_SUPPORT 0
#define ZSTD_LIB_COMPRESSION 0
#define ZSTD_NOBENCH
#define ZSTD_STRIP_ERROR_STRINGS
-/* common */
+/* lib/common */
#include "debug.c"
#include "entropy_common.c"
#include "error_private.c"
#include "fse_decompress.c"
-#include "xxhash.c"
#include "zstd_common.c"
-/* decompress */
+/* lib/decompress */
#include "huf_decompress.c"
#include "zstd_ddict.c"
#include "zstd_decompress.c"