diff --git a/uppsrc/plugin/lz4/lib/lz4.c b/uppsrc/plugin/lz4/lib/lz4.c index acdeb7082..d87c51c09 100644 --- a/uppsrc/plugin/lz4/lib/lz4.c +++ b/uppsrc/plugin/lz4/lib/lz4.c @@ -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); diff --git a/uppsrc/plugin/lz4/lib/lz4.h b/uppsrc/plugin/lz4/lib/lz4.h index e4933220c..faac8dad3 100644 --- a/uppsrc/plugin/lz4/lib/lz4.h +++ b/uppsrc/plugin/lz4/lib/lz4.h @@ -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) diff --git a/uppsrc/plugin/lz4/lz4.upp b/uppsrc/plugin/lz4/lz4.upp index 6ef30d3f6..c939ba3b4 100644 --- a/uppsrc/plugin/lz4/lz4.upp +++ b/uppsrc/plugin/lz4/lz4.upp @@ -1,3 +1,5 @@ +description "\3770,128,128"; + uses Core;