Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:04:56

0001 /* lzo1x.h -- public interface of the LZO1X compression algorithm
0002 
0003    This file is part of the LZO real-time data compression library.
0004 
0005    Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
0006    All Rights Reserved.
0007 
0008    The LZO library is free software; you can redistribute it and/or
0009    modify it under the terms of the GNU General Public License as
0010    published by the Free Software Foundation; either version 2 of
0011    the License, or (at your option) any later version.
0012 
0013    The LZO library is distributed in the hope that it will be useful,
0014    but WITHOUT ANY WARRANTY; without even the implied warranty of
0015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016    GNU General Public License for more details.
0017 
0018    You should have received a copy of the GNU General Public License
0019    along with the LZO library; see the file COPYING.
0020    If not, write to the Free Software Foundation, Inc.,
0021    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0022 
0023    Markus F.X.J. Oberhumer
0024    <markus@oberhumer.com>
0025    http://www.oberhumer.com/opensource/lzo/
0026  */
0027 
0028 
0029 #ifndef __LZO1X_H_INCLUDED
0030 #define __LZO1X_H_INCLUDED 1
0031 
0032 #ifndef __LZOCONF_H_INCLUDED
0033 #include <lzo/lzoconf.h>
0034 #endif
0035 
0036 #ifdef __cplusplus
0037 extern "C" {
0038 #endif
0039 
0040 
0041 /***********************************************************************
0042 //
0043 ************************************************************************/
0044 
0045 /* Memory required for the wrkmem parameter.
0046  * When the required size is 0, you can also pass a NULL pointer.
0047  */
0048 
0049 #define LZO1X_MEM_COMPRESS      LZO1X_1_MEM_COMPRESS
0050 #define LZO1X_MEM_DECOMPRESS    (0)
0051 #define LZO1X_MEM_OPTIMIZE      (0)
0052 
0053 
0054 /* decompression */
0055 LZO_EXTERN(int)
0056 lzo1x_decompress        ( const lzo_bytep src, lzo_uint  src_len,
0057                                 lzo_bytep dst, lzo_uintp dst_len,
0058                                 lzo_voidp wrkmem /* NOT USED */ );
0059 
0060 /* safe decompression with overrun testing */
0061 LZO_EXTERN(int)
0062 lzo1x_decompress_safe   ( const lzo_bytep src, lzo_uint  src_len,
0063                                 lzo_bytep dst, lzo_uintp dst_len,
0064                                 lzo_voidp wrkmem /* NOT USED */ );
0065 
0066 
0067 /***********************************************************************
0068 //
0069 ************************************************************************/
0070 
0071 #define LZO1X_1_MEM_COMPRESS    ((lzo_uint32_t) (16384L * lzo_sizeof_dict_t))
0072 
0073 LZO_EXTERN(int)
0074 lzo1x_1_compress        ( const lzo_bytep src, lzo_uint  src_len,
0075                                 lzo_bytep dst, lzo_uintp dst_len,
0076                                 lzo_voidp wrkmem );
0077 
0078 
0079 /***********************************************************************
0080 // special compressor versions
0081 ************************************************************************/
0082 
0083 /* this version needs only 8 KiB work memory */
0084 #define LZO1X_1_11_MEM_COMPRESS ((lzo_uint32_t) (2048L * lzo_sizeof_dict_t))
0085 
0086 LZO_EXTERN(int)
0087 lzo1x_1_11_compress     ( const lzo_bytep src, lzo_uint  src_len,
0088                                 lzo_bytep dst, lzo_uintp dst_len,
0089                                 lzo_voidp wrkmem );
0090 
0091 
0092 /* this version needs 16 KiB work memory */
0093 #define LZO1X_1_12_MEM_COMPRESS ((lzo_uint32_t) (4096L * lzo_sizeof_dict_t))
0094 
0095 LZO_EXTERN(int)
0096 lzo1x_1_12_compress     ( const lzo_bytep src, lzo_uint  src_len,
0097                                 lzo_bytep dst, lzo_uintp dst_len,
0098                                 lzo_voidp wrkmem );
0099 
0100 
0101 /* use this version if you need a little more compression speed */
0102 #define LZO1X_1_15_MEM_COMPRESS ((lzo_uint32_t) (32768L * lzo_sizeof_dict_t))
0103 
0104 LZO_EXTERN(int)
0105 lzo1x_1_15_compress     ( const lzo_bytep src, lzo_uint  src_len,
0106                                 lzo_bytep dst, lzo_uintp dst_len,
0107                                 lzo_voidp wrkmem );
0108 
0109 
0110 /***********************************************************************
0111 // better compression ratio at the cost of more memory and time
0112 ************************************************************************/
0113 
0114 #define LZO1X_999_MEM_COMPRESS  ((lzo_uint32_t) (14 * 16384L * sizeof(short)))
0115 
0116 LZO_EXTERN(int)
0117 lzo1x_999_compress      ( const lzo_bytep src, lzo_uint  src_len,
0118                                 lzo_bytep dst, lzo_uintp dst_len,
0119                                 lzo_voidp wrkmem );
0120 
0121 
0122 /***********************************************************************
0123 //
0124 ************************************************************************/
0125 
0126 LZO_EXTERN(int)
0127 lzo1x_999_compress_dict     ( const lzo_bytep src, lzo_uint  src_len,
0128                                     lzo_bytep dst, lzo_uintp dst_len,
0129                                     lzo_voidp wrkmem,
0130                               const lzo_bytep dict, lzo_uint dict_len );
0131 
0132 LZO_EXTERN(int)
0133 lzo1x_999_compress_level    ( const lzo_bytep src, lzo_uint  src_len,
0134                                     lzo_bytep dst, lzo_uintp dst_len,
0135                                     lzo_voidp wrkmem,
0136                               const lzo_bytep dict, lzo_uint dict_len,
0137                                     lzo_callback_p cb,
0138                                     int compression_level );
0139 
0140 LZO_EXTERN(int)
0141 lzo1x_decompress_dict_safe ( const lzo_bytep src, lzo_uint  src_len,
0142                                    lzo_bytep dst, lzo_uintp dst_len,
0143                                    lzo_voidp wrkmem /* NOT USED */,
0144                              const lzo_bytep dict, lzo_uint dict_len );
0145 
0146 
0147 /***********************************************************************
0148 // optimize a compressed data block
0149 ************************************************************************/
0150 
0151 LZO_EXTERN(int)
0152 lzo1x_optimize          (       lzo_bytep src, lzo_uint  src_len,
0153                                 lzo_bytep dst, lzo_uintp dst_len,
0154                                 lzo_voidp wrkmem /* NOT USED */ );
0155 
0156 
0157 
0158 #ifdef __cplusplus
0159 } /* extern "C" */
0160 #endif
0161 
0162 #endif /* already included */
0163 
0164 
0165 /* vim:set ts=4 sw=4 et: */