lzo1x.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. ** Command & Conquer Renegade(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. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Command & Conquer *
  23. * *
  24. * $Archive:: /Commando/Library/lzo1x.h $*
  25. * *
  26. * $Author:: Greg_h $*
  27. * *
  28. * $Modtime:: 7/22/97 11:37a $*
  29. * *
  30. * $Revision:: 1 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. /* lzo1x.h -- public interface of the LZO1X compression algorithm
  36. This file is part of the LZO real-time data compression library.
  37. Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  38. The LZO library is free software; you can redistribute it and/or
  39. modify it under the terms of the GNU Library General Public
  40. License as published by the Free Software Foundation; either
  41. version 2 of the License, or (at your option) any later version.
  42. The LZO library is distributed in the hope that it will be useful,
  43. but WITHOUT ANY WARRANTY; without even the implied warranty of
  44. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  45. Library General Public License for more details.
  46. You should have received a copy of the GNU Library General Public
  47. License along with the LZO library; see the file COPYING.LIB.
  48. If not, write to the Free Software Foundation, Inc.,
  49. 675 Mass Ave, Cambridge, MA 02139, USA.
  50. Markus F.X.J. Oberhumer
  51. [email protected]
  52. */
  53. #ifndef __LZO1X_H
  54. #define __LZO1X_H
  55. #include "lzoconf.h"
  56. //#ifdef __cplusplus
  57. //extern "C" {
  58. //#endif
  59. /***********************************************************************
  60. //
  61. ************************************************************************/
  62. /* Memory required for the wrkmem parameter.
  63. * When the required size is 0, you can also pass a NULL pointer.
  64. */
  65. #define LZO1X_MEM_COMPRESS ((lzo_uint) (16384L * sizeof(lzo_byte *)))
  66. #define LZO1X_MEM_DECOMPRESS (0)
  67. /* fast decompression */
  68. LZO_EXTERN(int)
  69. lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len,
  70. lzo_byte *dst, lzo_uint *dst_len,
  71. lzo_voidp wrkmem /* NOT USED */ );
  72. /* safe decompression with overrun testing */
  73. LZO_EXTERN(int)
  74. lzo1x_decompress_x ( const lzo_byte *src, lzo_uint src_len,
  75. lzo_byte *dst, lzo_uint *dst_len,
  76. lzo_voidp wrkmem /* NOT USED */ );
  77. /***********************************************************************
  78. //
  79. ************************************************************************/
  80. LZO_EXTERN(int)
  81. lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len,
  82. lzo_byte *dst, lzo_uint *dst_len,
  83. lzo_voidp wrkmem );
  84. /***********************************************************************
  85. // better compression ratio at the cost of more memory and time
  86. ************************************************************************/
  87. #define LZO1X_999_MEM_COMPRESS ((lzo_uint) (14 * 16384L * sizeof(short)))
  88. LZO_EXTERN(int)
  89. lzo1x_999_compress ( const lzo_byte *src, lzo_uint src_len,
  90. lzo_byte *dst, lzo_uint *dst_len,
  91. lzo_voidp wrkmem );
  92. //#ifdef __cplusplus
  93. //} /* extern "C" */
  94. //#endif
  95. #endif /* already included */
  96. /*
  97. vi:ts=4
  98. */