2 LZ4 auto-framing library
3 Header File for static linking only
4 Copyright (C) 2011-2015, Yann Collet.
6 BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are
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
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.
31 You can contact the author at :
32 - LZ4 source repository : https://github.com/Cyan4973/lz4
33 - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
38 #if defined (__cplusplus)
42 /* lz4frame_static.h should be used solely in the context of static linking.
43 * It contains definitions which may still change overtime.
44 * Never use it in the context of DLL linking.
48 /**************************************
50 **************************************/
54 /**************************************
56 * ************************************/
57 #define LZ4F_LIST_ERRORS(ITEM) \
58 ITEM(OK_NoError) ITEM(ERROR_GENERIC) \
59 ITEM(ERROR_maxBlockSize_invalid) ITEM(ERROR_blockMode_invalid) ITEM(ERROR_contentChecksumFlag_invalid) \
60 ITEM(ERROR_compressionLevel_invalid) \
61 ITEM(ERROR_headerVersion_wrong) ITEM(ERROR_blockChecksum_unsupported) ITEM(ERROR_reservedFlag_set) \
62 ITEM(ERROR_allocation_failed) \
63 ITEM(ERROR_srcSize_tooLarge) ITEM(ERROR_dstMaxSize_tooSmall) \
64 ITEM(ERROR_frameHeader_incomplete) ITEM(ERROR_frameType_unknown) ITEM(ERROR_frameSize_wrong) \
65 ITEM(ERROR_srcPtr_wrong) \
66 ITEM(ERROR_decompressionFailed) \
67 ITEM(ERROR_headerChecksum_invalid) ITEM(ERROR_contentChecksum_invalid) \
70 //#define LZ4F_DISABLE_OLD_ENUMS
71 #ifndef LZ4F_DISABLE_OLD_ENUMS
72 #define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM, ENUM = LZ4F_##ENUM,
74 #define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM,
76 typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM
) } LZ4F_errorCodes
; /* enum is exposed, to handle specific errors; compare function result to -enum value */
79 #if defined (__cplusplus)