Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request lz4#673 from lz4/dev
Browse files Browse the repository at this point in the history
minor update for v1.9.0
  • Loading branch information
Cyan4973 authored Apr 16, 2019
2 parents f1226ac + d25b6d6 commit 131896a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v1.9.0
perf: large decompression speed improvement on x86/x64 (~+20%) by @djwatson
perf: large decompression speed improvement on x86/x64 (up to +20%) by @djwatson
api : changed : _destSize() compression variants are promoted to stable API
api : new : LZ4_initStream(HC), replacing LZ4_resetStream(HC)
api : changed : LZ4_resetStream(HC) as recommended reset function, for better performance on small data
Expand All @@ -8,7 +8,7 @@ build: source code can be amalgamated, by Bing Xu
build: added meson build, by @lzutao
build: new build macros : LZ4_DISTANCE_MAX, LZ4_FAST_DEC_LOOP
install: MidnightBSD, by @laffer1
install: Windows 10 msys2, by @vtorri
install: msys2 on Windows 10, by @vtorri

v1.8.3
perf: minor decompression speed improvement (~+2%) with gcc
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Benchmarks

The benchmark uses [lzbench], from @inikep
compiled with GCC v8.2.0 on Linux 64-bits (Ubuntu 4.18.0-17).
The reference system uses a Core i7-9700K CPU @ 4.9GHz.
The reference system uses a Core i7-9700K CPU @ 4.9GHz (w/ turbo boost).
Benchmark evaluates the compression of reference [Silesia Corpus]
in single-thread mode.

Expand All @@ -61,14 +61,14 @@ in single-thread mode.
| Compressor | Ratio | Compression | Decompression |
| ---------- | ----- | ----------- | ------------- |
| memcpy | 1.000 | 13700 MB/s | 13700 MB/s |
|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4900 MB/s** |
|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4970 MB/s** |
| LZO 2.09 | 2.108 | 670 MB/s | 860 MB/s |
| QuickLZ 1.5.0 | 2.238 | 575 MB/s | 780 MB/s |
| Snappy 1.1.4 | 2.091 | 565 MB/s | 1950 MB/s |
| [Zstandard] 1.4.0 -1 | 2.883 | 515 MB/s | 1380 MB/s |
| LZF v3.6 | 2.073 | 415 MB/s | 910 MB/s |
| [zlib] deflate 1.2.11 -1| 2.730 | 100 MB/s | 415 MB/s |
|**LZ4 HC -9 (v1.8.2)** |**2.721**| 39 MB/s | **4850 MB/s** |
|**LZ4 HC -9 (v1.8.2)** |**2.721**| 41 MB/s | **4900 MB/s** |
| [zlib] deflate 1.2.11 -6| 3.099 | 36 MB/s | 445 MB/s |

[zlib]: http://www.zlib.net/
Expand Down
8 changes: 4 additions & 4 deletions lib/lz4frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
* by modifying below section.
*/
#include <stdlib.h> /* malloc, calloc, free */
#define ALLOC(s) malloc(s)
#ifndef LZ4_SRC_INCLUDED /* avoid redefinition when sources are coalesced */
# define ALLOC_AND_ZERO(s) calloc(1,(s))
# define ALLOC(s) malloc(s)
# define ALLOC_AND_ZERO(s) calloc(1,(s))
# define FREEMEM(p) free(p)
#endif
#define FREEMEM(p) free(p)

#include <string.h> /* memset, memcpy, memmove */
#ifndef LZ4_SRC_INCLUDED /* avoid redefinition when sources are coalesced */
# define MEM_INIT memset
# define MEM_INIT(p,v,s) memset((p),(v),(s))
#endif


Expand Down
4 changes: 2 additions & 2 deletions lib/lz4hc.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ int LZ4_compress_HC(const char* src, char* dst, int srcSize, int dstCapacity, in
#endif
int const cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel);
#if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1
free(statePtr);
FREEMEM(statePtr);
#endif
return cSize;
}
Expand Down Expand Up @@ -901,7 +901,7 @@ int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr)
{
DEBUGLOG(4, "LZ4_freeStreamHC(%p)", LZ4_streamHCPtr);
if (!LZ4_streamHCPtr) return 0; /* support free on NULL */
free(LZ4_streamHCPtr);
FREEMEM(LZ4_streamHCPtr);
return 0;
}

Expand Down

0 comments on commit 131896a

Please sign in to comment.