dmi: check both the AC and ID flags at the same time
[syslinux/sherbszt.git] / lzo / src / stats1b.h
blob453e7ab304478a09698db54192a7b9d88c0dd980
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
6 All Rights Reserved.
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
31 to change.
35 #ifndef __LZO_STATS1B_H
36 #define __LZO_STATS1B_H 1
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
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
51 #else
52 # define LZO_STATS(expr) ((void) 0)
53 #endif
56 #if (LZO_COLLECT_STATS)
58 typedef struct
60 /* algorithm configuration */
61 unsigned r_bits;
62 unsigned m3o_bits;
63 unsigned dd_bits;
64 unsigned clevel;
66 /* internal configuration */
67 unsigned d_bits;
68 long min_lookahead;
69 long max_lookbehind;
70 const char *compress_id;
72 /* counts */
73 long lit_runs;
74 long r0short_runs;
75 long r0fast_runs;
76 long r0long_runs;
77 long m1_matches;
78 long m2_matches;
79 long m3_matches;
80 long m4_matches;
81 long r1_matches;
83 /* */
84 long lit_run[R0MIN];
85 long m2_match[M2_MAX_LEN + 1];
86 long m3_match[M3_MAX_LEN + 1];
87 #if (M3O_BITS < 8)
88 long lit_runs_after_m3_match;
89 long lit_run_after_m3_match[LZO_SIZE(8-M3O_BITS)];
90 #endif
92 /* */
93 long matches;
94 long match_bytes;
95 long literals;
96 long literal_overhead;
97 long literal_bytes;
98 double literal_overhead_percent;
100 /* */
101 long unused_dict_entries;
102 double unused_dict_entries_percent;
104 /* */
105 long in_len;
106 long out_len;
108 lzo1b_stats_t;
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
119 #endif
122 #ifdef __cplusplus
123 } /* extern "C" */
124 #endif
126 #endif /* already included */
129 vi:ts=4:et