LZO1X.H 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* lzo1x.h -- public interface of the LZO1X compression algorithm
  19. This file is part of the LZO real-time data compression library.
  20. Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  21. The LZO library is free software; you can redistribute it and/or
  22. modify it under the terms of the GNU Library General Public
  23. License as published by the Free Software Foundation; either
  24. version 2 of the License, or (at your option) any later version.
  25. The LZO library is distributed in the hope that it will be useful,
  26. but WITHOUT ANY WARRANTY; without even the implied warranty of
  27. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  28. Library General Public License for more details.
  29. You should have received a copy of the GNU Library General Public
  30. License along with the LZO library; see the file COPYING.LIB.
  31. If not, write to the Free Software Foundation, Inc.,
  32. 675 Mass Ave, Cambridge, MA 02139, USA.
  33. Markus F.X.J. Oberhumer
  34. [email protected]
  35. */
  36. #ifndef __LZO1X_H
  37. #define __LZO1X_H
  38. #include "lzoconf.h"
  39. //#ifdef __cplusplus
  40. //extern "C" {
  41. //#endif
  42. /***********************************************************************
  43. //
  44. ************************************************************************/
  45. /* Memory required for the wrkmem parameter.
  46. * When the required size is 0, you can also pass a NULL pointer.
  47. */
  48. #define LZO1X_MEM_COMPRESS ((lzo_uint) (16384L * sizeof(lzo_byte *)))
  49. #define LZO1X_MEM_DECOMPRESS (0)
  50. /* fast decompression */
  51. LZO_EXTERN(int)
  52. lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len,
  53. lzo_byte *dst, lzo_uint *dst_len,
  54. lzo_voidp wrkmem /* NOT USED */ );
  55. /* safe decompression with overrun testing */
  56. LZO_EXTERN(int)
  57. lzo1x_decompress_x ( const lzo_byte *src, lzo_uint src_len,
  58. lzo_byte *dst, lzo_uint *dst_len,
  59. lzo_voidp wrkmem /* NOT USED */ );
  60. /***********************************************************************
  61. //
  62. ************************************************************************/
  63. LZO_EXTERN(int)
  64. lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len,
  65. lzo_byte *dst, lzo_uint *dst_len,
  66. lzo_voidp wrkmem );
  67. /***********************************************************************
  68. // better compression ratio at the cost of more memory and time
  69. ************************************************************************/
  70. #define LZO1X_999_MEM_COMPRESS ((lzo_uint) (14 * 16384L * sizeof(short)))
  71. LZO_EXTERN(int)
  72. lzo1x_999_compress ( const lzo_byte *src, lzo_uint src_len,
  73. lzo_byte *dst, lzo_uint *dst_len,
  74. lzo_voidp wrkmem );
  75. //#ifdef __cplusplus
  76. //} /* extern "C" */
  77. //#endif
  78. #endif /* already included */
  79. /*
  80. vi:ts=4
  81. */