Path: blob/main/sys/cddl/contrib/opensolaris/common/lz4/lz4.h
48521 views
/*1* LZ4 - Fast LZ compression algorithm2* Header File3* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions are7* met:8*9* * Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* * Redistributions in binary form must reproduce the above12* copyright notice, this list of conditions and the following disclaimer13* in the documentation and/or other materials provided with the14* distribution.15*16* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS17* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT18* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR19* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT20* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,21* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT22* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,23* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT25* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE26* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.27*28* You can contact the author at :29* - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html30* - LZ4 source repository : http://code.google.com/p/lz4/31*/3233#ifndef _LZ4_H34#define _LZ4_H3536#include <sys/types.h>3738#ifdef __cplusplus39extern "C" {40#endif4142extern size_t lz4_compress(void *, void *, size_t, size_t, int);43extern int lz4_decompress(void *, void *, size_t, size_t, int);4445#if defined(_KERNEL) || defined(_FAKE_KERNEL)46extern void lz4_init(void);47extern void lz4_fini(void);48#endif4950#ifdef __cplusplus51}52#endif5354#endif /* _LZ4_H */555657