Skip to content

Commit 43194f9

Browse files
committed
Merge pull request #61 from Cyan4973/dev
v0.3.2
2 parents da8557e + ee34cdf commit 43194f9

File tree

10 files changed

+38
-24
lines changed

10 files changed

+38
-24
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# ################################################################
3333

3434
# Version number
35-
export VERSION := 0.3.1
35+
export VERSION := 0.3.2
3636

3737
PRGDIR = programs
3838
ZSTDDIR = lib

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v0.3.2
2+
Fixed Visual Studio
3+
14
v0.3.1 :
25
Small compression ratio improvement
36

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ For a taste of its performance, here are a few benchmark numbers from a number o
2323
[zlib]:http://www.zlib.net/
2424
[LZ4]:http://www.lz4.org/
2525

26-
Zstd can also offer stronger compression ratio at the cost of compression speed. Compression speed is highly configurable, by small increment, to fit different situations. Note however that decompression speed is preserved and remain roughly the same at all settings, a property shared by most LZ compression algorithms, such as [zlib]. The following test is run on a Core i7-3930K CPU @ 4.5GHz, using [lzbench], an open-source in-memory benchmark by inikep.
26+
Zstd can also offer stronger compression ratio at the cost of compression speed. Speed / Ratio trade-off is configurable by small increment, to fit different situations. Note however that decompression speed is preserved and remain roughly the same at all settings, a property shared by most LZ compression algorithms, such as [zlib]. The following test is run on a Core i7-3930K CPU @ 4.5GHz, using [lzbench], an open-source in-memory benchmark by inikep, on the [Silesia compression corpus](http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia)
2727

2828
[lzbench]:https://github.com/inikep/lzbench
29-
Compression Ratio vs Speed | Decompression Speed
29+
30+
Compression Speed vs Ratio | Decompression Speed
3031
---------------------------|--------------------
31-
![Compression Ratio vs Speed](images/CSpeed.png "Compression Ratio vs Speed") | ![Decompression Speed](images/DSpeed.png "Decompression Speed")
32+
![Compression Speed vs Ratio](images/CSpeed.png "Compression Speed vs Ratio") | ![Decompression Speed](images/DSpeed.png "Decompression Speed")
3233

3334

3435
Zstd entropy stage is provided by [Huff0 and FSE, from Finite State Entrop library](https://github.com/Cyan4973/FiniteStateEntropy).

lib/huff0.c

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ size_t HUF_buildCTable (HUF_CElt* tree, const U32* count, U32 maxSymbolValue, U3
362362
U16 min = 0;
363363
for (n=maxNbBits; n>0; n--)
364364
{
365-
valPerRank[n] = min; // get starting value within each rank
365+
valPerRank[n] = min; /* get starting value within each rank */
366366
min += nbPerRank[n];
367367
min >>= 1;
368368
}
@@ -1027,18 +1027,23 @@ size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
10271027
U32 nextRankVal = 0;
10281028
U32 w, consumed;
10291029
const int rescale = (memLog-tableLog) - 1; /* tableLog <= memLog */
1030+
U32* rankVal0 = rankVal[0];
10301031
for (w=1; w<=maxW; w++)
10311032
{
10321033
U32 current = nextRankVal;
10331034
nextRankVal += rankStats[w] << (w+rescale);
1034-
rankVal[0][w] = current;
1035+
rankVal0[w] = current;
1036+
}
1037+
for (consumed = minBits; consumed <= memLog - minBits; consumed++)
1038+
{
1039+
U32* rankValPtr = rankVal[consumed];
1040+
for (w = 1; w <= maxW; w++)
1041+
{
1042+
rankValPtr[w] = rankVal0[w] >> consumed;
1043+
}
10351044
}
1036-
for (consumed=minBits; consumed <= memLog-minBits; consumed++)
1037-
for (w=1; w<=maxW; w++)
1038-
rankVal[consumed][w] = rankVal[0][w] >> consumed;
10391045
}
10401046

1041-
10421047
HUF_fillDTableX4(dt, memLog,
10431048
sortedSymbol, sizeOfSort,
10441049
rankStart0, rankVal, maxW,
@@ -1394,18 +1399,23 @@ size_t HUF_readDTableX6 (U32* DTable, const void* src, size_t srcSize)
13941399
U32 nextRankVal = 0;
13951400
U32 w, consumed;
13961401
const int rescale = (memLog-tableLog) - 1; /* tableLog <= memLog */
1402+
U32* rankVal0 = rankVal[0];
13971403
for (w=1; w<=maxW; w++)
13981404
{
13991405
U32 current = nextRankVal;
14001406
nextRankVal += rankStats[w] << (w+rescale);
1401-
rankVal[0][w] = current;
1407+
rankVal0[w] = current;
1408+
}
1409+
for (consumed = minBits; consumed <= memLog - minBits; consumed++)
1410+
{
1411+
U32* rankValPtr = rankVal[consumed];
1412+
for (w = 1; w <= maxW; w++)
1413+
{
1414+
rankValPtr[w] = rankVal0[w] >> consumed;
1415+
}
14021416
}
1403-
for (consumed=minBits; consumed <= memLog-minBits; consumed++)
1404-
for (w=1; w<=maxW; w++)
1405-
rankVal[consumed][w] = rankVal[0][w] >> consumed;
14061417
}
14071418

1408-
14091419
/* fill tables */
14101420
{
14111421
HUF_DDescX6* DDescription = (HUF_DDescX6*)(DTable+1);

lib/zstd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern "C" {
4848
***************************************/
4949
#define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */
5050
#define ZSTD_VERSION_MINOR 3 /* for new (non-breaking) interface capabilities */
51-
#define ZSTD_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
51+
#define ZSTD_VERSION_RELEASE 2 /* for tweaks, bug-fixes, or development */
5252
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
5353
unsigned ZSTD_versionNumber (void);
5454

lib/zstdhc_static.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ static const ZSTD_HC_parameters ZSTD_HC_defaultParameters[ZSTD_HC_MAX_CLEVEL+1]
105105
{ 21, 19, 20, 4, 5, ZSTD_HC_lazy }, /* level 8 */
106106
{ 21, 19, 20, 5, 5, ZSTD_HC_lazy }, /* level 9 */
107107
{ 21, 20, 20, 5, 5, ZSTD_HC_lazy }, /* level 10 */
108-
{ 21, 20, 20, 5, 5, ZSTD_HC_lazy }, /* level 11 */
108+
{ 21, 21, 20, 5, 5, ZSTD_HC_lazy }, /* level 11 */
109109
{ 22, 20, 22, 6, 5, ZSTD_HC_lazy }, /* level 12 */
110110
{ 22, 21, 22, 6, 5, ZSTD_HC_lazy }, /* level 13 */
111111
{ 23, 21, 22, 6, 5, ZSTD_HC_lazy }, /* level 14 */
112112
{ 23, 21, 23, 7, 5, ZSTD_HC_lazy }, /* level 15 */
113113
{ 23, 22, 22, 6, 5, ZSTD_HC_lazy }, /* level 16 */
114114
{ 23, 22, 22, 7, 5, ZSTD_HC_lazy }, /* level 17 */
115-
{ 23, 22, 23, 7, 5, ZSTD_HC_lazy }, /* level 18 */
115+
{ 23, 23, 22, 7, 5, ZSTD_HC_lazy }, /* level 18 */
116116
{ 23, 22, 23, 8, 5, ZSTD_HC_lazy }, /* level 19 */
117117
{ 23, 23, 23, 8, 5, ZSTD_HC_lazy }, /* level 20 */
118118
{ 23, 23, 23, 8, 5, ZSTD_HC_lazy }, /* level 21 */
119-
{ 24, 23, 23, 8, 5, ZSTD_HC_lazy }, /* level 22 */
119+
{ 24, 24, 24, 8, 5, ZSTD_HC_lazy }, /* level 22 */
120120
{ 24, 23, 23, 9, 5, ZSTD_HC_lazy }, /* level 23 */
121121
{ 24, 24, 24, 9, 5, ZSTD_HC_lazy }, /* level 24 */
122-
{ 24, 24, 24, 10, 5, ZSTD_HC_lazy }, /* level 25 */
122+
{ 24, 24, 24, 9, 5, ZSTD_HC_lazy }, /* level 25 */
123123
{ 24, 24, 24, 10, 5, ZSTD_HC_lazy }, /* level 26 */ /* ZSTD_HC_MAX_CLEVEL */
124124
};
125125

programs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# fullbench32: Same as fullbench, but forced to compile in 32-bits mode
3131
# ##########################################################################
3232

33-
VERSION?= 0.3.1
33+
VERSION?= 0.3.2
3434

3535
DESTDIR?=
3636
PREFIX ?= /usr/local

visual/2012/fullbench/fullbench.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</PropertyGroup>
7979
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
8080
<LinkIncremental>false</LinkIncremental>
81-
<IncludePath>$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
81+
<IncludePath>$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
8282
<RunCodeAnalysis>true</RunCodeAnalysis>
8383
</PropertyGroup>
8484
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

visual/2012/fuzzer/fuzzer.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</PropertyGroup>
7979
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
8080
<LinkIncremental>false</LinkIncremental>
81-
<IncludePath>$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
81+
<IncludePath>$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
8282
<RunCodeAnalysis>true</RunCodeAnalysis>
8383
</PropertyGroup>
8484
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

visual/2012/zstd/zstd.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</PropertyGroup>
110110
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
111111
<LinkIncremental>false</LinkIncremental>
112-
<IncludePath>$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
112+
<IncludePath>$(SolutionDir)..\..\programs\legacy;$(SolutionDir)..\..\lib\legacy;$(SolutionDir)..\..\lib;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
113113
<RunCodeAnalysis>true</RunCodeAnalysis>
114114
</PropertyGroup>
115115
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

0 commit comments

Comments
 (0)