mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.lz4 stats improved
git-svn-id: svn://ultimatepp.org/upp/trunk@7819 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ee020ca24f
commit
ac0086ef7d
3 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
description "\3770,128,128";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue