1 /* stats1b.h -- statistics for the the LZO library
3 This file is part of the LZO real-time data compression library.
5 Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
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.
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.
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.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
25 http://www.oberhumer.com/opensource/lzo/
29 /* WARNING: this file should *not* be used by applications. It is
30 part of the implementation of the library and is subject
35 #ifndef __LZO_STATS1B_H
36 #define __LZO_STATS1B_H 1
43 /***********************************************************************
44 // Collect statistical information when compressing.
45 // Useful for finetuning the compression algorithm.
46 // Examine the symbol 'lzo1b_stats' with a debugger.
47 ************************************************************************/
49 #if (LZO_COLLECT_STATS)
50 # define LZO_STATS(expr) expr
52 # define LZO_STATS(expr) ((void) 0)
56 #if (LZO_COLLECT_STATS)
60 /* algorithm configuration */
66 /* internal configuration */
70 const char *compress_id
;
85 long m2_match
[M2_MAX_LEN
+ 1];
86 long m3_match
[M3_MAX_LEN
+ 1];
88 long lit_runs_after_m3_match
;
89 long lit_run_after_m3_match
[LZO_SIZE(8-M3O_BITS
)];
96 long literal_overhead
;
98 double literal_overhead_percent
;
101 long unused_dict_entries
;
102 double unused_dict_entries_percent
;
111 void _lzo1b_stats_init(lzo1b_stats_t
*lzo_stats
);
112 void _lzo1b_stats_calc(lzo1b_stats_t
*lzo_stats
);
114 extern lzo1b_stats_t
* const lzo1b_stats
;
116 #define lzo_stats_t lzo1b_stats_t
117 #define lzo_stats lzo1b_stats
126 #endif /* already included */