1eefd8f96SConrad Meyer /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3eefd8f96SConrad Meyer * 4eefd8f96SConrad Meyer * Copyright (c) 2019 Conrad Meyer <cem@FreeBSD.org> 5eefd8f96SConrad Meyer * 6eefd8f96SConrad Meyer * Redistribution and use in source and binary forms, with or without 7eefd8f96SConrad Meyer * modification, are permitted provided that the following conditions 8eefd8f96SConrad Meyer * are met: 9eefd8f96SConrad Meyer * 1. Redistributions of source code must retain the above copyright 10eefd8f96SConrad Meyer * notice, this list of conditions and the following disclaimer. 11eefd8f96SConrad Meyer * 2. Redistributions in binary form must reproduce the above copyright 12eefd8f96SConrad Meyer * notice, this list of conditions and the following disclaimer in the 13eefd8f96SConrad Meyer * documentation and/or other materials provided with the distribution. 14eefd8f96SConrad Meyer * 15eefd8f96SConrad Meyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16eefd8f96SConrad Meyer * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17eefd8f96SConrad Meyer * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18eefd8f96SConrad Meyer * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19eefd8f96SConrad Meyer * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20eefd8f96SConrad Meyer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21eefd8f96SConrad Meyer * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22eefd8f96SConrad Meyer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23eefd8f96SConrad Meyer * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24eefd8f96SConrad Meyer * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25eefd8f96SConrad Meyer * SUCH DAMAGE. 26eefd8f96SConrad Meyer */ 27eefd8f96SConrad Meyer 28eefd8f96SConrad Meyer #define DEFAULT_SUFX_ZSTD ".uzst" 29eefd8f96SConrad Meyer 30*525a177cSRobert Wing #define CLOOP_MAGIC_ZSTD "#!/bin/sh\n#Z4.0 Format\n" 31eefd8f96SConrad Meyer 32eefd8f96SConrad Meyer size_t mkuz_zstd_cbound(size_t); 33eefd8f96SConrad Meyer void *mkuz_zstd_init(int *); 34eefd8f96SConrad Meyer void mkuz_zstd_compress(void *, const struct mkuz_blk *, struct mkuz_blk *); 35