lzo1z.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* lzo1z.h -- public interface of the LZO1Z compression algorithm
  2. This file is part of the LZO real-time data compression library.
  3. Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
  4. All Rights Reserved.
  5. The LZO library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of
  8. the License, or (at your option) any later version.
  9. The LZO library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with the LZO library; see the file COPYING.
  15. If not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. Markus F.X.J. Oberhumer
  18. <markus@oberhumer.com>
  19. http://www.oberhumer.com/opensource/lzo/
  20. */
  21. #ifndef __LZO1Z_H_INCLUDED
  22. #define __LZO1Z_H_INCLUDED 1
  23. #ifndef __LZOCONF_H_INCLUDED
  24. #include <lzo/lzoconf.h>
  25. #endif
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /***********************************************************************
  30. //
  31. ************************************************************************/
  32. /* Memory required for the wrkmem parameter.
  33. * When the required size is 0, you can also pass a NULL pointer.
  34. */
  35. #define LZO1Z_MEM_DECOMPRESS (0)
  36. /* decompression */
  37. LZO_EXTERN(int)
  38. lzo1z_decompress ( const lzo_bytep src, lzo_uint src_len,
  39. lzo_bytep dst, lzo_uintp dst_len,
  40. lzo_voidp wrkmem /* NOT USED */ );
  41. /* safe decompression with overrun testing */
  42. LZO_EXTERN(int)
  43. lzo1z_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
  44. lzo_bytep dst, lzo_uintp dst_len,
  45. lzo_voidp wrkmem /* NOT USED */ );
  46. /***********************************************************************
  47. // better compression ratio at the cost of more memory and time
  48. ************************************************************************/
  49. #define LZO1Z_999_MEM_COMPRESS ((lzo_uint32_t) (14 * 16384L * sizeof(short)))
  50. LZO_EXTERN(int)
  51. lzo1z_999_compress ( const lzo_bytep src, lzo_uint src_len,
  52. lzo_bytep dst, lzo_uintp dst_len,
  53. lzo_voidp wrkmem );
  54. /***********************************************************************
  55. //
  56. ************************************************************************/
  57. LZO_EXTERN(int)
  58. lzo1z_999_compress_dict ( const lzo_bytep src, lzo_uint src_len,
  59. lzo_bytep dst, lzo_uintp dst_len,
  60. lzo_voidp wrkmem,
  61. const lzo_bytep dict, lzo_uint dict_len );
  62. LZO_EXTERN(int)
  63. lzo1z_999_compress_level ( const lzo_bytep src, lzo_uint src_len,
  64. lzo_bytep dst, lzo_uintp dst_len,
  65. lzo_voidp wrkmem,
  66. const lzo_bytep dict, lzo_uint dict_len,
  67. lzo_callback_p cb,
  68. int compression_level );
  69. LZO_EXTERN(int)
  70. lzo1z_decompress_dict_safe ( const lzo_bytep src, lzo_uint src_len,
  71. lzo_bytep dst, lzo_uintp dst_len,
  72. lzo_voidp wrkmem /* NOT USED */,
  73. const lzo_bytep dict, lzo_uint dict_len );
  74. #ifdef __cplusplus
  75. } /* extern "C" */
  76. #endif
  77. #endif /* already included */
  78. /* vim:set ts=4 sw=4 et: */