Releasing debian version 3:6.03+dfsg-10.
[syslinux-debian.git] / lzo / src / stats1a.h
blob5c2af38cec350ed972ac7ee52ff4f1829e4e4a02
1 /* stats1a.h -- statistics for the the LZO1A algorithm
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 LZO package and is subject
31 to change.
35 #ifndef __LZO_STATS1A_H
36 #define __LZO_STATS1A_H 1
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
44 /***********************************************************************
45 // collect statistical information when compressing
46 // used for finetuning, view 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 /***********************************************************************
58 ************************************************************************/
60 typedef struct {
62 /* configuration */
63 unsigned rbits;
64 unsigned clevel;
66 /* internal configuration */
67 unsigned dbits;
68 unsigned lbits;
70 /* constants */
71 unsigned min_match_short;
72 unsigned max_match_short;
73 unsigned min_match_long;
74 unsigned max_match_long;
75 unsigned min_offset;
76 unsigned max_offset;
77 unsigned r0min;
78 unsigned r0fast;
79 unsigned r0max;
81 /* counts */
82 long short_matches;
83 long long_matches;
84 long r1_matches;
85 long lit_runs;
86 long lit_runs_after_long_match;
87 long r0short_runs;
88 long r0fast_runs;
89 long r0long_runs;
91 /* */
92 long lit_run[RSIZE];
93 long lit_run_after_long_match[RSIZE];
94 long short_match[MAX_MATCH_SHORT + 1];
95 long long_match[MAX_MATCH_LONG + 1];
96 long marker[256];
98 /* these could prove useful for further optimizations */
99 long short_match_offset_osize[MAX_MATCH_SHORT + 1];
100 long short_match_offset_256[MAX_MATCH_SHORT + 1];
101 long short_match_offset_1024[MAX_MATCH_SHORT + 1];
102 long matches_out_of_range;
103 long matches_out_of_range_2;
104 long matches_out_of_range_4;
105 long match_out_of_range[MAX_MATCH_SHORT + 1];
107 /* */
108 long in_len;
109 long out_len;
111 lzo1a_stats_t;
113 extern lzo1a_stats_t *lzo1a_stats;
117 #ifdef __cplusplus
118 } /* extern "C" */
119 #endif
121 #endif /* already included */
124 vi:ts=4:et