blob: dd50850f22fc13d022a98a95f3bb981c9dba85b5 [file] [log] [blame]
/*******************************************************************************
* Copyright 2014, MARVELL SEMICONDUCTOR, LTD. *
* THIS CODE CONTAINS CONFIDENTIAL INFORMATION OF MARVELL. *
* NO RIGHTS ARE GRANTED HEREIN UNDER ANY PATENT, MASK WORK RIGHT OR COPYRIGHT *
* OF MARVELL OR ANY THIRD PARTY. MARVELL RESERVES THE RIGHT AT ITS SOLE *
* DISCRETION TO REQUEST THAT THIS CODE BE IMMEDIATELY RETURNED TO MARVELL. *
* THIS CODE IS PROVIDED "AS IS". MARVELL MAKES NO WARRANTIES, EXPRESSED, *
* IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. *
* *
* MARVELL COMPRISES MARVELL TECHNOLOGY GROUP LTD. (MTGL) AND ITS SUBSIDIARIES, *
* MARVELL INTERNATIONAL LTD. (MIL), MARVELL TECHNOLOGY, INC. (MTI), MARVELL *
* SEMICONDUCTOR, INC. (MSI), MARVELL ASIA PTE LTD. (MAPL), MARVELL JAPAN K.K. *
* (MJKK), MARVELL ISRAEL LTD. (MSIL). *
*******************************************************************************/
///////////////////////////////////////////////////////////////////////////////
//! \file lz4dec.h
//! \brief decode a lz4 compressed input stream.
///////////////////////////////////////////////////////////////////////////////
#ifndef _LZ4DEC_H_
#define _LZ4DEC_H_
#define LZ4IO_MAGICNUMBER (0x184D2204)
#if defined (__cplusplus)
extern "C" {
#endif //__cplusplus
/** @brief decode a compressed lz4input stream, only
* started with LZ4IO_MAGICNUMBER supported.
*
*
* @param in_buf the input stream buffer, contains the full
* input data, started with LZ4IO_MAGICNUMBER.
* @param input_size the whole input tream size, including the magic,
* in bytes.
* @param out_buf the decode result.
* @param output_size the decode output buffer size when used as input,
* and final decoded stream length in bytes as output.
* @return 0 if success, negative if failed.
*/
int lz4_decompress(const unsigned char *in_buf, const unsigned int input_size, unsigned char *out_buf, unsigned int *output_size);
#if defined (__cplusplus)
}
#endif //__cplusplus
#endif //_LZ4DEC_H_