xref: /freebsd/sys/cddl/contrib/opensolaris/common/lz4/lz4.h (revision e499793e7625e9f272c04b4b705cb6af013a9231)
1*e499793eSToomas Soome /*
2*e499793eSToomas Soome  * LZ4 - Fast LZ compression algorithm
3*e499793eSToomas Soome  * Header File
4*e499793eSToomas Soome  * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
5*e499793eSToomas Soome  *
6*e499793eSToomas Soome  * Redistribution and use in source and binary forms, with or without
7*e499793eSToomas Soome  * modification, are permitted provided that the following conditions are
8*e499793eSToomas Soome  * met:
9*e499793eSToomas Soome  *
10*e499793eSToomas Soome  *     * Redistributions of source code must retain the above copyright
11*e499793eSToomas Soome  * notice, this list of conditions and the following disclaimer.
12*e499793eSToomas Soome  *     * Redistributions in binary form must reproduce the above
13*e499793eSToomas Soome  * copyright notice, this list of conditions and the following disclaimer
14*e499793eSToomas Soome  * in the documentation and/or other materials provided with the
15*e499793eSToomas Soome  * distribution.
16*e499793eSToomas Soome  *
17*e499793eSToomas Soome  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18*e499793eSToomas Soome  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19*e499793eSToomas Soome  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20*e499793eSToomas Soome  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21*e499793eSToomas Soome  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22*e499793eSToomas Soome  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23*e499793eSToomas Soome  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24*e499793eSToomas Soome  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25*e499793eSToomas Soome  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*e499793eSToomas Soome  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27*e499793eSToomas Soome  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*e499793eSToomas Soome  *
29*e499793eSToomas Soome  * You can contact the author at :
30*e499793eSToomas Soome  * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
31*e499793eSToomas Soome  * - LZ4 source repository : http://code.google.com/p/lz4/
32*e499793eSToomas Soome  */
33*e499793eSToomas Soome 
34*e499793eSToomas Soome #ifndef _LZ4_H
35*e499793eSToomas Soome #define	_LZ4_H
36*e499793eSToomas Soome 
37*e499793eSToomas Soome #include <sys/types.h>
38*e499793eSToomas Soome 
39*e499793eSToomas Soome #ifdef __cplusplus
40*e499793eSToomas Soome extern "C" {
41*e499793eSToomas Soome #endif
42*e499793eSToomas Soome 
43*e499793eSToomas Soome extern size_t lz4_compress(void *, void *, size_t, size_t, int);
44*e499793eSToomas Soome extern int lz4_decompress(void *, void *, size_t, size_t, int);
45*e499793eSToomas Soome 
46*e499793eSToomas Soome #ifdef __cplusplus
47*e499793eSToomas Soome }
48*e499793eSToomas Soome #endif
49*e499793eSToomas Soome 
50*e499793eSToomas Soome #endif /* _LZ4_H */
51