kusano 7d535a
/*
kusano 7d535a
   LZ4 auto-framing library
kusano 7d535a
   Header File for static linking only
kusano 7d535a
   Copyright (C) 2011-2015, Yann Collet.
kusano 7d535a
kusano 7d535a
   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
kusano 7d535a
kusano 7d535a
   Redistribution and use in source and binary forms, with or without
kusano 7d535a
   modification, are permitted provided that the following conditions are
kusano 7d535a
   met:
kusano 7d535a
kusano 7d535a
       * Redistributions of source code must retain the above copyright
kusano 7d535a
   notice, this list of conditions and the following disclaimer.
kusano 7d535a
       * Redistributions in binary form must reproduce the above
kusano 7d535a
   copyright notice, this list of conditions and the following disclaimer
kusano 7d535a
   in the documentation and/or other materials provided with the
kusano 7d535a
   distribution.
kusano 7d535a
kusano 7d535a
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
kusano 7d535a
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
kusano 7d535a
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
kusano 7d535a
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
kusano 7d535a
   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
kusano 7d535a
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
kusano 7d535a
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
kusano 7d535a
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
kusano 7d535a
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
kusano 7d535a
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
kusano 7d535a
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
kusano 7d535a
kusano 7d535a
   You can contact the author at :
kusano 7d535a
   - LZ4 source repository : https://github.com/Cyan4973/lz4
kusano 7d535a
   - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
kusano 7d535a
*/
kusano 7d535a
kusano 7d535a
#pragma once
kusano 7d535a
kusano 7d535a
#if defined (__cplusplus)
kusano 7d535a
extern "C" {
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
/* lz4frame_static.h should be used solely in the context of static linking.
kusano 7d535a
 * It contains definitions which may still change overtime.
kusano 7d535a
 * Never use it in the context of DLL linking.
kusano 7d535a
 * */
kusano 7d535a
kusano 7d535a
kusano 7d535a
/**************************************
kusano 7d535a
*  Includes
kusano 7d535a
**************************************/
kusano 7d535a
#include "lz4frame.h"
kusano 7d535a
kusano 7d535a
kusano 7d535a
/**************************************
kusano 7d535a
 * Error management
kusano 7d535a
 * ************************************/
kusano 7d535a
#define LZ4F_LIST_ERRORS(ITEM) \
kusano 7d535a
        ITEM(OK_NoError) ITEM(ERROR_GENERIC) \
kusano 7d535a
        ITEM(ERROR_maxBlockSize_invalid) ITEM(ERROR_blockMode_invalid) ITEM(ERROR_contentChecksumFlag_invalid) \
kusano 7d535a
        ITEM(ERROR_compressionLevel_invalid) \
kusano 7d535a
        ITEM(ERROR_headerVersion_wrong) ITEM(ERROR_blockChecksum_unsupported) ITEM(ERROR_reservedFlag_set) \
kusano 7d535a
        ITEM(ERROR_allocation_failed) \
kusano 7d535a
        ITEM(ERROR_srcSize_tooLarge) ITEM(ERROR_dstMaxSize_tooSmall) \
kusano 7d535a
        ITEM(ERROR_frameHeader_incomplete) ITEM(ERROR_frameType_unknown) ITEM(ERROR_frameSize_wrong) \
kusano 7d535a
        ITEM(ERROR_srcPtr_wrong) \
kusano 7d535a
        ITEM(ERROR_decompressionFailed) \
kusano 7d535a
        ITEM(ERROR_headerChecksum_invalid) ITEM(ERROR_contentChecksum_invalid) \
kusano 7d535a
        ITEM(ERROR_maxCode)
kusano 7d535a
kusano 7d535a
//#define LZ4F_DISABLE_OLD_ENUMS
kusano 7d535a
#ifndef LZ4F_DISABLE_OLD_ENUMS
kusano 7d535a
#define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM, ENUM = LZ4F_##ENUM,
kusano 7d535a
#else
kusano 7d535a
#define LZ4F_GENERATE_ENUM(ENUM) LZ4F_##ENUM,
kusano 7d535a
#endif
kusano 7d535a
typedef enum { LZ4F_LIST_ERRORS(LZ4F_GENERATE_ENUM) } LZ4F_errorCodes;  /* enum is exposed, to handle specific errors; compare function result to -enum value */
kusano 7d535a
kusano 7d535a
kusano 7d535a
#if defined (__cplusplus)
kusano 7d535a
}
kusano 7d535a
#endif