mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
dc544aba15
ZStandard is a modern, high performance, general compression algorithm. It provides similar or better compression levels to GZIP, but with much better performance. ZStandard provides a large selection of compression levels to allow a storage administrator to select the preferred performance/compression trade-off. This commit imports the unmodified ZStandard single-file library which will be used by ZFS. The implementation of this new library is done with future updates of zstd in mind. For this reason we integrated the code in a way, that does not require modifications to the library. For more details, see `module/zstd/README.md`. The library is excluded from codecov calculation and cppcheck as unaltered dependencies do not need full codecov or cppcheck. Co-authored-by: Allan Jude <allanjude@freebsd.org> Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Co-authored-by: Michael Niewöhner <foss@mniewoehner.de> Signed-off-by: Allan Jude <allanjude@freebsd.org> Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
69 lines
2.6 KiB
C
69 lines
2.6 KiB
C
/*
|
|
* BSD 3-Clause Clear License
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions are met:
|
|
*
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
* this list of conditions and the following disclaimer.
|
|
*
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
* and/or other materials provided with the distribution.
|
|
*
|
|
* 3. Neither the name of the copyright holder nor the names of its
|
|
* contributors may be used to endorse or promote products derived from this
|
|
* software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
|
|
* Copyright (c) 2019-2020, Michael Niewöhner
|
|
*/
|
|
|
|
#define MEM_MODULE
|
|
#define XXH_NAMESPACE ZSTD_
|
|
#define XXH_PRIVATE_API
|
|
#define XXH_INLINE_ALL
|
|
#define ZSTD_LEGACY_SUPPORT 0
|
|
#define ZSTD_LIB_DICTBUILDER 0
|
|
#define ZSTD_LIB_DEPRECATED 0
|
|
#define ZSTD_NOBENCH
|
|
|
|
#include "common/debug.c"
|
|
#include "common/entropy_common.c"
|
|
#include "common/error_private.c"
|
|
#include "common/fse_decompress.c"
|
|
#include "common/pool.c"
|
|
#include "common/zstd_common.c"
|
|
|
|
#include "compress/fse_compress.c"
|
|
#include "compress/hist.c"
|
|
#include "compress/huf_compress.c"
|
|
#include "compress/zstd_compress_literals.c"
|
|
#include "compress/zstd_compress_sequences.c"
|
|
#include "compress/zstd_compress_superblock.c"
|
|
#include "compress/zstd_compress.c"
|
|
#include "compress/zstd_double_fast.c"
|
|
#include "compress/zstd_fast.c"
|
|
#include "compress/zstd_lazy.c"
|
|
#include "compress/zstd_ldm.c"
|
|
#include "compress/zstd_opt.c"
|
|
|
|
#include "decompress/huf_decompress.c"
|
|
#include "decompress/zstd_ddict.c"
|
|
#include "decompress/zstd_decompress.c"
|
|
#include "decompress/zstd_decompress_block.c"
|