Skip to content

Commit 863ff3b

Browse files
committed
Merge pull request #67 from Cyan4973/dev
Dev
2 parents 9876e1e + acd222c commit 863ff3b

File tree

13 files changed

+258
-333
lines changed

13 files changed

+258
-333
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.3
35+
export VERSION := 0.3.4
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.4
2+
Faster fast cLevels
3+
14
v0.3.3
25
Small compression ratio improvement
36

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It is provided as a BSD-license package, hosted on Github.
77
|master | [![Build Status](https://travis-ci.org/Cyan4973/zstd.svg?branch=master)](https://travis-ci.org/Cyan4973/zstd) |
88
|dev | [![Build Status](https://travis-ci.org/Cyan4973/zstd.svg?branch=dev)](https://travis-ci.org/Cyan4973/zstd) |
99

10-
For a taste of its performance, here are a few benchmark numbers from a number of compression codecs suitable for real-time. The test was completed on a Core i7-5600U @ 2.6 GHz, using [fsbench 0.14.3](http://encode.ru/threads/1371-Filesystem-benchmark?p=34029&viewfull=1#post34029), an open-source benchmark program by m^2.
10+
For a taste of its performance, here are a few benchmark numbers from a number of compression codecs suitable for real-time. The test was completed on a Core i7-5600U @ 2.6 GHz, using m^2's [fsbench 0.14.3](http://encode.ru/threads/1371-Filesystem-benchmark?p=34029&viewfull=1#post34029) compiled with gcc 4.8.4, on the [Silesia compression corpus](http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia).
1111

1212
|Name | Ratio | C.speed | D.speed |
1313
|-----------------|-------|--------:|--------:|
@@ -23,7 +23,7 @@ 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. 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)
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 compiled with gcc 5.2.1, on the [Silesia compression corpus](http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia).
2727

2828
[lzbench]:https://github.com/inikep/lzbench
2929

@@ -32,9 +32,9 @@ Compression Speed vs Ratio | Decompression Speed
3232
![Compression Speed vs Ratio](images/CSpeed.png "Compression Speed vs Ratio") | ![Decompression Speed](images/DSpeed.png "Decompression Speed")
3333

3434

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

37-
Its memory requirement can also be configured to fit into low-memory hardware configurations, or servers handling multiple connections/contexts in parallel.
37+
Its memory requirement can be configured to fit into low-memory hardware configurations, or servers handling multiple connections/contexts in parallel.
3838

3939
Zstd has not yet reached "stable format" status. It doesn't guarantee yet that its current compressed format will remain stable and supported in future versions. During this period, it can still change to adapt new optimizations still being investigated. "Stable Format" is projected sometimes early 2016.
4040

images/CSpeed.png

100644100755
17.9 KB
Loading

images/DSpeed.png

100644100755
4.11 KB
Loading

lib/zstd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125

126126
static const U32 g_maxDistance = 4 * BLOCKSIZE;
127127
static const U32 g_maxLimit = 1 GB;
128-
static const U32 g_searchStrength = 8;
129128

130129
#define WORKPLACESIZE (BLOCKSIZE*3)
131130
#define MINMATCH 4
@@ -524,8 +523,6 @@ static U32 ZSTD_hashPtr(const void* p) { return ( (MEM_read64(p) * prime7bytes
524523

525524
//static U32 ZSTD_hashPtr(const void* p) { return ( (*(U32*)p * KNUTH) >> (32-HASH_LOG)); }
526525

527-
static void ZSTD_addPtr(U32* table, const BYTE* p, const BYTE* start) { table[ZSTD_hashPtr(p)] = (U32)(p-start); }
528-
529526
static const BYTE* ZSTD_updateMatch(U32* table, const BYTE* p, const BYTE* start)
530527
{
531528
U32 h = ZSTD_hashPtr(p);
@@ -540,6 +537,8 @@ static int ZSTD_checkMatch(const BYTE* match, const BYTE* ip)
540537
return MEM_read32(match) == MEM_read32(ip);
541538
}
542539

540+
static void ZSTD_addPtr(U32* table, const BYTE* p, const BYTE* start) { table[ZSTD_hashPtr(p)] = (U32)(p-start); }
541+
543542

544543
static size_t ZSTD_compressBlock(ZSTD_CCtx* ctx, void* dst, size_t maxDstSize, const void* src, size_t srcSize)
545544
{

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 3 /* for tweaks, bug-fixes, or development */
51+
#define ZSTD_VERSION_RELEASE 4 /* 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/zstd_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ typedef struct {
206206

207207
void ZSTD_resetSeqStore(seqStore_t* ssPtr);
208208

209+
static const U32 g_searchStrength = 8;
210+
209211
#define REPCODE_STARTVALUE 4
210212
#define MLbits 7
211213
#define LLbits 6
@@ -217,7 +219,6 @@ void ZSTD_resetSeqStore(seqStore_t* ssPtr);
217219
#define MIN_SEQUENCES_SIZE (2 /*seqNb*/ + 2 /*dumps*/ + 3 /*seqTables*/ + 1 /*bitStream*/)
218220
#define MIN_CBLOCK_SIZE (3 /*litCSize*/ + MIN_SEQUENCES_SIZE)
219221

220-
221222
/** ZSTD_storeSeq
222223
Store a sequence (literal length, literals, offset code and match length) into seqStore_t
223224
@offsetCode : distance to match, or 0 == repCode

0 commit comments

Comments
 (0)