home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 March / PCO3_97.ISO / filesbbs / os2 / lzo026.arj / LZO026.ZIP / lzo-0.26 / src / config1c.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-16  |  3.7 KB  |  144 lines

  1. /* config1c.h -- configuration for the LZO1C algorithm
  2.  
  3.    This file is part of the LZO real-time data compression library.
  4.  
  5.    Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
  6.  
  7.    The LZO library is free software; you can redistribute it and/or
  8.    modify it under the terms of the GNU General Public License as
  9.    published by the Free Software Foundation; either version 2 of
  10.    the License, or (at your option) any later version.
  11.  
  12.    The LZO library is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with the LZO library; see the file COPYING.
  19.    If not, write to the Free Software Foundation, Inc.,
  20.    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21.  
  22.    Markus F.X.J. Oberhumer
  23.    markus.oberhumer@jk.uni-linz.ac.at
  24.  */
  25.  
  26.  
  27. /* WARNING: this file should *not* be used by applications. It is
  28.    part of the implementation of the library and is subject
  29.    to change.
  30.  */
  31.  
  32.  
  33. #ifndef __LZO_CONFIG1C_H
  34. #define __LZO_CONFIG1C_H
  35.  
  36. #undef NDEBUG
  37. #if 1 && !defined(NDEBUG) && !defined(LZO_DEBUG)
  38. #define NDEBUG
  39. #endif
  40. #include <assert.h>
  41.  
  42. #include <lzo1c.h>
  43. #include "lzo_conf.h"
  44.  
  45.  
  46. /***********************************************************************
  47. // algorithm configuration
  48. ************************************************************************/
  49.  
  50. /* run bits (4 - 5) - the compressor and the decompressor
  51.  * must use the same value. */
  52. #if !defined(RBITS)
  53. #  define RBITS        5
  54. #endif
  55.  
  56. /* dictionary depth (0 - 6) - this only affects the compressor.
  57.  * 0 is fastest, 6 is best compression ratio */
  58. #if !defined(DDBITS)
  59. #  define DDBITS    0
  60. #endif
  61.  
  62. /* compression level (1 - 9) - this only affects the compressor.
  63.  * 1 is fastest, 9 is best compression ratio */
  64. #if !defined(CLEVEL)
  65. #  define CLEVEL    1            /* fastest by default */
  66. #endif
  67.  
  68.  
  69. /* check configuration */
  70. #if (RBITS < 4 || RBITS > 5)
  71. #  error invalid RBITS
  72. #endif
  73. #if (DDBITS < 0 || DDBITS > 6)
  74. #  error invalid DDBITS
  75. #endif
  76. #if (CLEVEL < 1 || CLEVEL > 9)
  77. #  error invalid CLEVEL
  78. #endif
  79.  
  80.  
  81. /***********************************************************************
  82. // internal configuration
  83. ************************************************************************/
  84.  
  85. /* add a special code so that the decompressor can detect the
  86.  * end of the compressed data block (overhead is 3 bytes per block) */
  87. #undef LZO_EOF_CODE
  88. #define LZO_EOF_CODE
  89.  
  90. /* return -1 instead of copying if the data cannot be compressed */
  91. #undef LZO_RETURN_IF_NOT_COMPRESSIBLE
  92.  
  93.  
  94. /***********************************************************************
  95. // algorithm internal configuration
  96. ************************************************************************/
  97.  
  98. /* choose the hashing strategy */
  99. #define LZO_HASH_LZO_INCREMENTAL_A
  100. /* #define LZO_HASH_GZIP */
  101. /* #define LZO_HASH_GZIP_INCREMENTAL */
  102.  
  103.  
  104. /* config */
  105. #define R_BITS            RBITS
  106. #define DD_BITS            DDBITS
  107. #ifndef D_BITS
  108. #define D_BITS            14
  109. #endif
  110.  
  111.  
  112. /***********************************************************************
  113. // optimization and debugging
  114. ************************************************************************/
  115.  
  116. /* Collect statistics */
  117. #if 0 && !defined(LZO_COLLECT_STATS)
  118. #  define LZO_COLLECT_STATS
  119. #endif
  120.  
  121.  
  122. /***********************************************************************
  123. //
  124. ************************************************************************/
  125.  
  126. /* good parameters when using a blocksize of 8kB */
  127. #define M3O_BITS        6
  128. #undef LZO_DETERMINISTIC
  129.  
  130.  
  131. #include "lzo_util.h"
  132. #include "lzo1b_de.h"
  133. #include "stats1c.h"
  134.  
  135. #include "lzo1c_cc.h"
  136.  
  137.  
  138. #endif /* already included */
  139.  
  140. /*
  141. vi:ts=4
  142. */
  143.  
  144.