NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lz4frame_static.h
Go to the documentation of this file.
1 /*
2  LZ4 auto-framing library
3  Header File for static linking only
4  Copyright (C) 2011-2015, Yann Collet.
5 
6  BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are
10  met:
11 
12  * Redistributions of source code must retain the above copyright
13  notice, this list of conditions and the following disclaimer.
14  * Redistributions in binary form must reproduce the above
15  copyright notice, this list of conditions and the following disclaimer
16  in the documentation and/or other materials provided with the
17  distribution.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31  You can contact the author at :
32  - LZ4 source repository : http://code.google.com/p/lz4/
33  - LZ4 source mirror : https://github.com/Cyan4973/lz4
34  - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
35 */
36 
37 #pragma once
38 
39 #if defined (__cplusplus)
40 extern "C" {
41 #endif
42 
43 /* lz4frame_static.h should be used solely in the context of static linking.
44  * */
45 
46 
47 /**************************************
48  * Error management
49  * ************************************/
50 #define LZ4F_LIST_ERRORS(ITEM) \
51  ITEM(OK_NoError) ITEM(ERROR_GENERIC) \
52  ITEM(ERROR_maxBlockSize_invalid) ITEM(ERROR_blockMode_invalid) ITEM(ERROR_contentChecksumFlag_invalid) \
53  ITEM(ERROR_compressionLevel_invalid) \
54  ITEM(ERROR_allocation_failed) \
55  ITEM(ERROR_srcSize_tooLarge) ITEM(ERROR_dstMaxSize_tooSmall) \
56  ITEM(ERROR_decompressionFailed) \
57  ITEM(ERROR_checksum_invalid) \
58  ITEM(ERROR_maxCode)
59 
60 #define LZ4F_GENERATE_ENUM(ENUM) ENUM,
61 typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) } LZ4F_errorCodes; /* enum is exposed, to handle specific errors; compare function result to -enum value */
62 
63 
64 /**************************************
65  Includes
66 **************************************/
67 #include "lz4frame.h"
68 
69 
70 #if defined (__cplusplus)
71 }
72 #endif