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