Home | History | Annotate | Download | only in src
      1 /* config1x.h -- configuration for the LZO1X algorithm
      2 
      3    This file is part of the LZO real-time data compression library.
      4 
      5    Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
      6    All Rights Reserved.
      7 
      8    The LZO library is free software; you can redistribute it and/or
      9    modify it under the terms of the GNU General Public License as
     10    published by the Free Software Foundation; either version 2 of
     11    the License, or (at your option) any later version.
     12 
     13    The LZO library is distributed in the hope that it will be useful,
     14    but WITHOUT ANY WARRANTY; without even the implied warranty of
     15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16    GNU General Public License for more details.
     17 
     18    You should have received a copy of the GNU General Public License
     19    along with the LZO library; see the file COPYING.
     20    If not, write to the Free Software Foundation, Inc.,
     21    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     22 
     23    Markus F.X.J. Oberhumer
     24    <markus (at) oberhumer.com>
     25    http://www.oberhumer.com/opensource/lzo/
     26  */
     27 
     28 
     29 /* WARNING: this file should *not* be used by applications. It is
     30    part of the implementation of the library and is subject
     31    to change.
     32  */
     33 
     34 
     35 #ifndef __LZO_CONFIG1X_H
     36 #define __LZO_CONFIG1X_H 1
     37 
     38 #if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z)
     39 #  define LZO1X 1
     40 #endif
     41 
     42 #include "lzo_conf.h"
     43 #if !defined(__LZO_IN_MINILZO)
     44 #include "lzo/lzo1x.h"
     45 #endif
     46 
     47 
     48 /***********************************************************************
     49 //
     50 ************************************************************************/
     51 
     52 #ifndef LZO_EOF_CODE
     53 #define LZO_EOF_CODE 1
     54 #endif
     55 #undef LZO_DETERMINISTIC
     56 
     57 #define M1_MAX_OFFSET   0x0400
     58 #ifndef M2_MAX_OFFSET
     59 #define M2_MAX_OFFSET   0x0800
     60 #endif
     61 #define M3_MAX_OFFSET   0x4000
     62 #define M4_MAX_OFFSET   0xbfff
     63 
     64 #define MX_MAX_OFFSET   (M1_MAX_OFFSET + M2_MAX_OFFSET)
     65 
     66 #define M1_MIN_LEN      2
     67 #define M1_MAX_LEN      2
     68 #define M2_MIN_LEN      3
     69 #ifndef M2_MAX_LEN
     70 #define M2_MAX_LEN      8
     71 #endif
     72 #define M3_MIN_LEN      3
     73 #define M3_MAX_LEN      33
     74 #define M4_MIN_LEN      3
     75 #define M4_MAX_LEN      9
     76 
     77 #define M1_MARKER       0
     78 #define M2_MARKER       64
     79 #define M3_MARKER       32
     80 #define M4_MARKER       16
     81 
     82 
     83 /***********************************************************************
     84 //
     85 ************************************************************************/
     86 
     87 #ifndef MIN_LOOKAHEAD
     88 #define MIN_LOOKAHEAD       (M2_MAX_LEN + 1)
     89 #endif
     90 
     91 #if defined(LZO_NEED_DICT_H)
     92 
     93 #ifndef LZO_HASH
     94 #define LZO_HASH            LZO_HASH_LZO_INCREMENTAL_B
     95 #endif
     96 #define DL_MIN_LEN          M2_MIN_LEN
     97 #include "lzo_dict.h"
     98 
     99 #endif
    100 
    101 
    102 
    103 #endif /* already included */
    104 
    105 /*
    106 vi:ts=4:et
    107 */
    108 
    109