Blame src/stats1a.h

Packit 679830
/* stats1a.h -- statistics for the the LZO1A algorithm
Packit 679830
Packit 679830
   This file is part of the LZO real-time data compression library.
Packit 679830
Packit 679830
   Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer
Packit 679830
   All Rights Reserved.
Packit 679830
Packit 679830
   The LZO library is free software; you can redistribute it and/or
Packit 679830
   modify it under the terms of the GNU General Public License as
Packit 679830
   published by the Free Software Foundation; either version 2 of
Packit 679830
   the License, or (at your option) any later version.
Packit 679830
Packit 679830
   The LZO library is distributed in the hope that it will be useful,
Packit 679830
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 679830
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 679830
   GNU General Public License for more details.
Packit 679830
Packit 679830
   You should have received a copy of the GNU General Public License
Packit 679830
   along with the LZO library; see the file COPYING.
Packit 679830
   If not, write to the Free Software Foundation, Inc.,
Packit 679830
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 679830
Packit 679830
   Markus F.X.J. Oberhumer
Packit 679830
   <markus@oberhumer.com>
Packit 679830
   http://www.oberhumer.com/opensource/lzo/
Packit 679830
 */
Packit 679830
Packit 679830
Packit 679830
/* WARNING: this file should *not* be used by applications. It is
Packit 679830
   part of the implementation of the LZO package and is subject
Packit 679830
   to change.
Packit 679830
 */
Packit 679830
Packit 679830
Packit 679830
#ifndef __LZO_STATS1A_H
Packit 679830
#define __LZO_STATS1A_H 1
Packit 679830
Packit 679830
#ifdef __cplusplus
Packit 679830
extern "C" {
Packit 679830
#endif
Packit 679830
Packit 679830
Packit 679830
Packit 679830
/***********************************************************************
Packit 679830
// collect statistical information when compressing
Packit 679830
// used for finetuning, view with a debugger
Packit 679830
************************************************************************/
Packit 679830
Packit 679830
#if (LZO_COLLECT_STATS)
Packit 679830
#  define LZO_STATS(expr)   expr
Packit 679830
#else
Packit 679830
#  define LZO_STATS(expr)   ((void) 0)
Packit 679830
#endif
Packit 679830
Packit 679830
Packit 679830
/***********************************************************************
Packit 679830
//
Packit 679830
************************************************************************/
Packit 679830
Packit 679830
typedef struct {
Packit 679830
Packit 679830
/* configuration */
Packit 679830
    unsigned rbits;
Packit 679830
    unsigned clevel;
Packit 679830
Packit 679830
/* internal configuration */
Packit 679830
    unsigned dbits;
Packit 679830
    unsigned lbits;
Packit 679830
Packit 679830
/* constants */
Packit 679830
    unsigned min_match_short;
Packit 679830
    unsigned max_match_short;
Packit 679830
    unsigned min_match_long;
Packit 679830
    unsigned max_match_long;
Packit 679830
    unsigned min_offset;
Packit 679830
    unsigned max_offset;
Packit 679830
    unsigned r0min;
Packit 679830
    unsigned r0fast;
Packit 679830
    unsigned r0max;
Packit 679830
Packit 679830
/* counts */
Packit 679830
    long short_matches;
Packit 679830
    long long_matches;
Packit 679830
    long r1_matches;
Packit 679830
    long lit_runs;
Packit 679830
    long lit_runs_after_long_match;
Packit 679830
    long r0short_runs;
Packit 679830
    long r0fast_runs;
Packit 679830
    long r0long_runs;
Packit 679830
Packit 679830
/* */
Packit 679830
    long lit_run[RSIZE];
Packit 679830
    long lit_run_after_long_match[RSIZE];
Packit 679830
    long short_match[MAX_MATCH_SHORT + 1];
Packit 679830
    long long_match[MAX_MATCH_LONG + 1];
Packit 679830
    long marker[256];
Packit 679830
Packit 679830
/* these could prove useful for further optimizations */
Packit 679830
    long short_match_offset_osize[MAX_MATCH_SHORT + 1];
Packit 679830
    long short_match_offset_256[MAX_MATCH_SHORT + 1];
Packit 679830
    long short_match_offset_1024[MAX_MATCH_SHORT + 1];
Packit 679830
    long matches_out_of_range;
Packit 679830
    long matches_out_of_range_2;
Packit 679830
    long matches_out_of_range_4;
Packit 679830
    long match_out_of_range[MAX_MATCH_SHORT + 1];
Packit 679830
Packit 679830
/* */
Packit 679830
    long in_len;
Packit 679830
    long out_len;
Packit 679830
}
Packit 679830
lzo1a_stats_t;
Packit 679830
Packit 679830
extern lzo1a_stats_t *lzo1a_stats;
Packit 679830
Packit 679830
Packit 679830
Packit 679830
#ifdef __cplusplus
Packit 679830
} /* extern "C" */
Packit 679830
#endif
Packit 679830
Packit 679830
#endif /* already included */
Packit 679830
Packit 679830
/*
Packit 679830
vi:ts=4:et
Packit 679830
*/