.lz4 stats improved

git-svn-id: svn://ultimatepp.org/upp/trunk@7819 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-10-23 13:41:04 +00:00
parent ee020ca24f
commit ac0086ef7d
3 changed files with 6 additions and 1 deletions

View file

@ -434,6 +434,7 @@ int matchLengthStat[1024];
int matchLengthBig;
int litLengthStat[1024];
int litLengthStatBig;
int literals;
#endif
static int LZ4_compress_generic(
@ -546,6 +547,7 @@ static int LZ4_compress_generic(
litLengthStat[litLength]++;
else
litLengthStatBig++;
literals += litLength;
#endif
token = op++;
if ((outputLimited) && (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit)))
@ -642,7 +644,7 @@ _next_match:
if ( ((dictIssue==dictSmall) ? (ref>=lowRefLimit) : 1)
&& (ref+MAX_DISTANCE>=ip)
&& (A32(ref+refDelta)==A32(ip)) )
{ token=op++; *token=0; goto _next_match; }
{ token=op++; *token=0; litLengthStat[0]++; goto _next_match; }
/* Prepare next loop */
forwardH = LZ4_hashPosition(++ip, tableType);

View file

@ -327,6 +327,7 @@ extern int matchLengthStat[1024];
extern int matchLengthBig;
extern int litLengthStat[1024];
extern int litLengthStatBig;
extern int literals;
#endif
#if defined (__cplusplus)

View file

@ -1,3 +1,5 @@
description "\3770,128,128";
uses
Core;