LZO1X.H 3.7 KB

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