|
Packit Service |
5195f2 |
/* lzo1b.h -- public interface of the LZO1B compression algorithm
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
This file is part of the LZO real-time data compression library.
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
|
|
Packit Service |
5195f2 |
All Rights Reserved.
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
The LZO library is free software; you can redistribute it and/or
|
|
Packit Service |
5195f2 |
modify it under the terms of the GNU General Public License as
|
|
Packit Service |
5195f2 |
published by the Free Software Foundation; either version 2 of
|
|
Packit Service |
5195f2 |
the License, or (at your option) any later version.
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
The LZO library is distributed in the hope that it will be useful,
|
|
Packit Service |
5195f2 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
5195f2 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
5195f2 |
GNU General Public License for more details.
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
You should have received a copy of the GNU General Public License
|
|
Packit Service |
5195f2 |
along with the LZO library; see the file COPYING.
|
|
Packit Service |
5195f2 |
If not, write to the Free Software Foundation, Inc.,
|
|
Packit Service |
5195f2 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
Markus F.X.J. Oberhumer
|
|
Packit Service |
5195f2 |
<markus@oberhumer.com>
|
|
Packit Service |
5195f2 |
http://www.oberhumer.com/opensource/lzo/
|
|
Packit Service |
5195f2 |
*/
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#ifndef __LZO1B_H_INCLUDED
|
|
Packit Service |
5195f2 |
#define __LZO1B_H_INCLUDED 1
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#ifndef __LZOCONF_H_INCLUDED
|
|
Packit Service |
5195f2 |
#include "lzoconf.h"
|
|
Packit Service |
5195f2 |
#endif
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#ifdef __cplusplus
|
|
Packit Service |
5195f2 |
extern "C" {
|
|
Packit Service |
5195f2 |
#endif
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/***********************************************************************
|
|
Packit Service |
5195f2 |
//
|
|
Packit Service |
5195f2 |
************************************************************************/
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/* Memory required for the wrkmem parameter.
|
|
Packit Service |
5195f2 |
* When the required size is 0, you can also pass a NULL pointer.
|
|
Packit Service |
5195f2 |
*/
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#define LZO1B_MEM_COMPRESS ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t))
|
|
Packit Service |
5195f2 |
#define LZO1B_MEM_DECOMPRESS (0)
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/* compression levels */
|
|
Packit Service |
5195f2 |
#define LZO1B_BEST_SPEED 1
|
|
Packit Service |
5195f2 |
#define LZO1B_BEST_COMPRESSION 9
|
|
Packit Service |
5195f2 |
#define LZO1B_DEFAULT_COMPRESSION (-1) /* fastest by default */
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem,
|
|
Packit Service |
5195f2 |
int compression_level );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/* decompression */
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_decompress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem /* NOT USED */ );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/* safe decompression with overrun testing */
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem /* NOT USED */ );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/***********************************************************************
|
|
Packit Service |
5195f2 |
//
|
|
Packit Service |
5195f2 |
************************************************************************/
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_1_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_2_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_3_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_4_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_5_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_6_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_7_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_8_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_9_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/***********************************************************************
|
|
Packit Service |
5195f2 |
// better compression ratio at the cost of more memory and time
|
|
Packit Service |
5195f2 |
************************************************************************/
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#define LZO1B_99_MEM_COMPRESS ((lzo_uint32_t) (65536L * lzo_sizeof_dict_t))
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_99_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#define LZO1B_999_MEM_COMPRESS ((lzo_uint32_t) (3 * 65536L * sizeof(lzo_xint)))
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
LZO_EXTERN(int)
|
|
Packit Service |
5195f2 |
lzo1b_999_compress ( const lzo_bytep src, lzo_uint src_len,
|
|
Packit Service |
5195f2 |
lzo_bytep dst, lzo_uintp dst_len,
|
|
Packit Service |
5195f2 |
lzo_voidp wrkmem );
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#ifdef __cplusplus
|
|
Packit Service |
5195f2 |
} /* extern "C" */
|
|
Packit Service |
5195f2 |
#endif
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
#endif /* already included */
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
|
|
Packit Service |
5195f2 |
/* vim:set ts=4 sw=4 et: */
|