home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / lzo / lzo1z.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-09  |  5.0 KB  |  147 lines

  1. /* lzo1z.h -- public interface of the LZO1Z compression algorithm
  2.  
  3.    This file is part of the LZO real-time data compression library.
  4.  
  5.    Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
  6.    Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
  7.    Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
  8.    Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
  9.    Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
  10.    Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
  11.    Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
  12.    Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
  13.    Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
  14.    Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  15.    All Rights Reserved.
  16.  
  17.    The LZO library is free software; you can redistribute it and/or
  18.    modify it under the terms of the GNU General Public License,
  19.    version 2, as published by the Free Software Foundation.
  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.    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  30.  
  31.    Markus F.X.J. Oberhumer
  32.    <markus@oberhumer.com>
  33.    http://www.oberhumer.com/opensource/lzo/
  34.  */
  35.  
  36.  
  37. #ifndef __LZO1Z_H_INCLUDED
  38. #define __LZO1Z_H_INCLUDED
  39.  
  40. #ifndef __LZOCONF_H_INCLUDED
  41. #include "lzoconf.h"
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48.  
  49. /***********************************************************************
  50. //
  51. ************************************************************************/
  52.  
  53. /* Memory required for the wrkmem parameter.
  54.  * When the required size is 0, you can also pass a NULL pointer.
  55.  */
  56.  
  57. #define LZO1Z_MEM_COMPRESS      ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
  58. #define LZO1Z_MEM_DECOMPRESS    (0)
  59. #define LZO1Z_MEM_OPTIMIZE      (0)
  60.  
  61.  
  62. /* decompression */
  63. LZO_EXTERN(int)
  64. lzo1z_decompress        ( const lzo_bytep src, lzo_uint  src_len,
  65.                                 lzo_bytep dst, lzo_uintp dst_len,
  66.                                 lzo_voidp wrkmem /* NOT USED */ );
  67.  
  68. /* safe decompression with overrun testing */
  69. LZO_EXTERN(int)
  70. lzo1z_decompress_safe   ( const lzo_bytep src, lzo_uint  src_len,
  71.                                 lzo_bytep dst, lzo_uintp dst_len,
  72.                                 lzo_voidp wrkmem /* NOT USED */ );
  73.  
  74.  
  75. /***********************************************************************
  76. //
  77. ************************************************************************/
  78.  
  79. #if 0
  80. /* not yet implemented */
  81. LZO_EXTERN(int)
  82. lzo1z_1_compress        ( const lzo_bytep src, lzo_uint  src_len,
  83.                                 lzo_bytep dst, lzo_uintp dst_len,
  84.                                 lzo_voidp wrkmem );
  85. #endif
  86.  
  87.  
  88. /***********************************************************************
  89. // better compression ratio at the cost of more memory and time
  90. ************************************************************************/
  91.  
  92. #define LZO1Z_999_MEM_COMPRESS  ((lzo_uint32) (14 * 16384L * sizeof(short)))
  93.  
  94. LZO_EXTERN(int)
  95. lzo1z_999_compress      ( const lzo_bytep src, lzo_uint  src_len,
  96.                                 lzo_bytep dst, lzo_uintp dst_len,
  97.                                 lzo_voidp wrkmem );
  98.  
  99.  
  100. /***********************************************************************
  101. //
  102. ************************************************************************/
  103.  
  104. LZO_EXTERN(int)
  105. lzo1z_999_compress_dict     ( const lzo_bytep in , lzo_uint  in_len,
  106.                                     lzo_bytep out, lzo_uintp out_len,
  107.                                     lzo_voidp wrkmem,
  108.                               const lzo_bytep dict, lzo_uint dict_len );
  109.  
  110. LZO_EXTERN(int)
  111. lzo1z_999_compress_level    ( const lzo_bytep in , lzo_uint  in_len,
  112.                                     lzo_bytep out, lzo_uintp out_len,
  113.                                     lzo_voidp wrkmem,
  114.                               const lzo_bytep dict, lzo_uint dict_len,
  115.                                     lzo_callback_p cb,
  116.                                     int compression_level );
  117.  
  118. LZO_EXTERN(int)
  119. lzo1z_decompress_dict_safe ( const lzo_bytep in,  lzo_uint  in_len,
  120.                                    lzo_bytep out, lzo_uintp out_len,
  121.                                    lzo_voidp wrkmem /* NOT USED */,
  122.                              const lzo_bytep dict, lzo_uint dict_len );
  123.  
  124.  
  125. /***********************************************************************
  126. // optimize a compressed data block
  127. ************************************************************************/
  128.  
  129. #if 0
  130. /* not yet implemented */
  131. LZO_EXTERN(int)
  132. lzo1z_optimize          (       lzo_bytep in , lzo_uint  in_len,
  133.                                 lzo_bytep out, lzo_uintp out_len,
  134.                                 lzo_voidp wrkmem /* NOT USED */ );
  135. #endif
  136.  
  137.  
  138.  
  139. #ifdef __cplusplus
  140. } /* extern "C" */
  141. #endif
  142.  
  143. #endif /* already included */
  144.  
  145.  
  146. /* vim:set ts=4 et: */
  147.