/apps/desktop/libvncserver/minilzo.h

http://ftk.googlecode.com/ · C++ Header · 100 lines · 33 code · 21 blank · 46 comment · 2 complexity · a8c300f0ded2c8f8902550ea07a5b677 MD5 · raw file

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