Blame src/stats1a.h

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