Subversion Repositories Games.Chess Giants

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* wrap.h */
  2.  
  3. /*
  4.  X11 License:
  5.  
  6.  Copyright (c) 2010 Miguel A. Ballicora
  7.  
  8.  Permission is hereby granted, free of charge, to any person
  9.  obtaining a copy of this software and associated documentation
  10.  files (the "Software"), to deal in the Software without
  11.  restriction, including without limitation the rights to use,
  12.  copy, modify, merge, publish, distribute, sublicense, and/or sell
  13.  copies of the Software, and to permit persons to whom the
  14.  Software is furnished to do so, subject to the following
  15.  conditions:
  16.  
  17.  The above copyright notice and this permission notice shall be
  18.  included in all copies or substantial portions of the Software.
  19.  
  20.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21.  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  22.  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  23.  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  24.  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  25.  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  26.  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  27.  OTHER DEALINGS IN THE SOFTWARE.
  28. */
  29.  
  30. #if !defined(H_WRAP)
  31. #define H_WRAP
  32.  
  33. #define LZMA86
  34. /*#define ZLIB*/
  35. /*#define HUFFMAN*/
  36. /*#define LIBLZF*/
  37. /*#define LIBBZIP2*/
  38.  
  39. /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
  40. #include <stdlib.h>
  41.  
  42. #if defined(ZLIB)
  43. extern int zlib_encode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  44. extern int zlib_decode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  45. #endif
  46.  
  47. #if defined(LLIBLZF)
  48. extern int lzf_encode  (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  49. extern int lzf_decode  (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  50. #endif
  51.  
  52. #if defined(LZMA86)
  53. extern int lzma_encode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  54. extern int lzma_decode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  55. #endif
  56.  
  57. #if defined (LIBBZIP2)
  58. extern int bzip2_encode(const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  59. extern int bzip2_decode(const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  60. #endif
  61.  
  62. extern int rle_encode  (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  63. extern int rle_decode  (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  64.  
  65. extern int justcopy_encode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  66. extern int justcopy_decode (const unsigned char *in_start, size_t in_len, unsigned char *out_start, size_t *pout_len, size_t out_max);
  67.  
  68.  
  69. /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
  70. #endif
  71.