src/minilzo.h
changeset 5475 2e6990a8c7c4
parent 4434 a08cb4b5c179
child 6201 bee01dc45e39
equal deleted inserted replaced
5474:ac55aefc54f3 5475:2e6990a8c7c4
       
     1 /* $Id$ */
       
     2 
       
     3 /* minilzo.h -- mini subset of the LZO real-time data compression library
       
     4 
       
     5    This file is part of the LZO real-time data compression library.
       
     6 
       
     7    Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
       
     8    Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
       
     9    Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
       
    10    Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
       
    11    Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
       
    12    Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
       
    13    Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
       
    14    All Rights Reserved.
       
    15 
       
    16    The LZO library is free software; you can redistribute it and/or
       
    17    modify it under the terms of the GNU General Public License as
       
    18    published by the Free Software Foundation; either version 2 of
       
    19    the License, or (at your option) any later version.
       
    20 
       
    21    The LZO library is distributed in the hope that it will be useful,
       
    22    but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    24    GNU General Public License for more details.
       
    25 
       
    26    You should have received a copy of the GNU General Public License
       
    27    along with the LZO library; see the file COPYING.
       
    28    If not, write to the Free Software Foundation, Inc.,
       
    29    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
       
    30 
       
    31    Markus F.X.J. Oberhumer
       
    32    <markus@oberhumer.com>
       
    33    http://www.oberhumer.com/opensource/lzo/
       
    34  */
       
    35 
       
    36 /*
       
    37  * NOTE:
       
    38  *   the full LZO package can be found at
       
    39  *   http://www.oberhumer.com/opensource/lzo/
       
    40  */
       
    41 
       
    42 
       
    43 #ifndef MINILZO_H
       
    44 #define MINILZO_H
       
    45 
       
    46 #define MINILZO_VERSION         0x1080
       
    47 
       
    48 #ifdef __LZOCONF_H
       
    49 #  error "you cannot use both LZO and miniLZO"
       
    50 #endif
       
    51 
       
    52 #undef LZO_HAVE_CONFIG_H
       
    53 #include "lzoconf.h"
       
    54 
       
    55 #if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
       
    56 #  error "version mismatch in header files"
       
    57 #endif
       
    58 
       
    59 
       
    60 #ifdef __cplusplus
       
    61 extern "C" {
       
    62 #endif
       
    63 
       
    64 
       
    65 /* Memory required for the wrkmem parameter.
       
    66  * When the required size is 0, you can also pass a NULL pointer.
       
    67  */
       
    68 
       
    69 #define LZO1X_MEM_COMPRESS      LZO1X_1_MEM_COMPRESS
       
    70 #define LZO1X_1_MEM_COMPRESS    ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
       
    71 #define LZO1X_MEM_DECOMPRESS    (0)
       
    72 
       
    73 
       
    74 /* compression */
       
    75 LZO_EXTERN(int)
       
    76 lzo1x_1_compress        ( const lzo_byte *src, lzo_uint  src_len,
       
    77                                 lzo_byte *dst, lzo_uintp dst_len,
       
    78                                 lzo_voidp wrkmem );
       
    79 
       
    80 /* decompression */
       
    81 LZO_EXTERN(int)
       
    82 lzo1x_decompress        ( const lzo_byte *src, lzo_uint  src_len,
       
    83                                 lzo_byte *dst, lzo_uintp dst_len,
       
    84                                 lzo_voidp wrkmem /* NOT USED */ );
       
    85 
       
    86 /* safe decompression with overrun testing */
       
    87 LZO_EXTERN(int)
       
    88 lzo1x_decompress_safe   ( const lzo_byte *src, lzo_uint  src_len,
       
    89                                 lzo_byte *dst, lzo_uintp dst_len,
       
    90                                 lzo_voidp wrkmem /* NOT USED */ );
       
    91 
       
    92 
       
    93 #ifdef __cplusplus
       
    94 } /* extern "C" */
       
    95 #endif
       
    96 
       
    97 #endif /* MINILZO_H */