|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .circleci/ | | 12-May-2024 | - | 89 | 51 |
| build/ | | 12-May-2024 | - | 5,037 | 4,940 |
| contrib/ | | 12-May-2024 | - | 1,132 | 842 |
| doc/ | | 12-May-2024 | - | 1,748 | 1,386 |
| examples/ | | 12-May-2024 | - | 3,180 | 2,222 |
| lib/ | | 12-May-2024 | - | 11,015 | 6,923 |
| ossfuzz/ | | 12-May-2024 | - | 1,514 | 1,070 |
| programs/ | | 12-May-2024 | - | 5,829 | 4,292 |
| tests/ | | 12-May-2024 | - | 7,738 | 5,949 |
| .cirrus.yml | D | 12-May-2024 | 99 | 6 | 4 |
| .gitattributes | D | 12-May-2024 | 348 | 22 | 17 |
| .gitignore | D | 12-May-2024 | 353 | 44 | 35 |
| .travis.yml | D | 12-May-2024 | 814 | 43 | 30 |
| BUILD.gn | D | 12-May-2024 | 977 | 34 | 31 |
| INSTALL | D | 12-May-2024 | 630 | 17 | 13 |
| LICENSE | D | 12-May-2024 | 635 | 13 | 10 |
| Makefile | D | 12-May-2024 | 9 KiB | 280 | 187 |
| Makefile.inc | D | 12-May-2024 | 3.2 KiB | 112 | 69 |
| NEWS | D | 12-May-2024 | 16.9 KiB | 342 | 302 |
| OAT.xml | D | 12-May-2024 | 5.3 KiB | 81 | 25 |
| README.OpenSource | D | 12-May-2024 | 434 | 12 | 11 |
| README.md | D | 12-May-2024 | 5 KiB | 121 | 88 |
| appveyor.yml | D | 12-May-2024 | 6 KiB | 148 | 141 |
| bundle.json | D | 12-May-2024 | 843 | 30 | 30 |
| tmp | D | 12-May-2024 | 64 KiB | | |
| tmpsparse | D | 12-May-2024 | 64 KiB | | |
README.OpenSource
1[
2 {
3 "Name": "lz4",
4 "License": "BSD 2-Clause License",
5 "License File": "LICENSE",
6 "Version Number": "1.9.4",
7 "Owner": "chennaidong@huawei.com",
8 "Upstream URL": "https://github.com/lz4/lz4",
9 "Description": "This package provides a streaming interface to LZ4 data streams as well as low level compress and uncompress functions for LZ4 data blocks. The implementation is based on the reference C one."
10 }
11]
12
README.md
1LZ4 - Extremely fast compression
2================================
3
4LZ4 is lossless compression algorithm,
5providing compression speed > 500 MB/s per core,
6scalable with multi-cores CPU.
7It features an extremely fast decoder,
8with speed in multiple GB/s per core,
9typically reaching RAM speed limits on multi-core systems.
10
11Speed can be tuned dynamically, selecting an "acceleration" factor
12which trades compression ratio for faster speed.
13On the other end, a high compression derivative, LZ4_HC, is also provided,
14trading CPU time for improved compression ratio.
15All versions feature the same decompression speed.
16
17LZ4 is also compatible with [dictionary compression](https://github.com/facebook/zstd#the-case-for-small-data-compression),
18both at [API](https://github.com/lz4/lz4/blob/v1.8.3/lib/lz4frame.h#L481) and [CLI](https://github.com/lz4/lz4/blob/v1.8.3/programs/lz4.1.md#operation-modifiers) levels.
19It can ingest any input file as dictionary, though only the final 64KB are used.
20This capability can be combined with the [Zstandard Dictionary Builder](https://github.com/facebook/zstd/blob/v1.3.5/programs/zstd.1.md#dictionary-builder),
21in order to drastically improve compression performance on small files.
22
23
24LZ4 library is provided as open-source software using BSD 2-Clause license.
25
26
27|Branch |Status |
28|------------|---------|
29|dev | [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] |
30
31[travisDevBadge]: https://travis-ci.org/lz4/lz4.svg?branch=dev "Continuous Integration test suite"
32[travisLink]: https://travis-ci.org/lz4/lz4
33[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/github/lz4/lz4?branch=dev&svg=true "Windows test suite"
34[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/lz4-1lndh
35
36
37Benchmarks
38-------------------------
39
40The benchmark uses [lzbench], from @inikep
41compiled with GCC v8.2.0 on Linux 64-bits (Ubuntu 4.18.0-17).
42The reference system uses a Core i7-9700K CPU @ 4.9GHz (w/ turbo boost).
43Benchmark evaluates the compression of reference [Silesia Corpus]
44in single-thread mode.
45
46[lzbench]: https://github.com/inikep/lzbench
47[Silesia Corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
48
49| Compressor | Ratio | Compression | Decompression |
50| ---------- | ----- | ----------- | ------------- |
51| memcpy | 1.000 | 13700 MB/s | 13700 MB/s |
52|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4970 MB/s** |
53| LZO 2.09 | 2.108 | 670 MB/s | 860 MB/s |
54| QuickLZ 1.5.0 | 2.238 | 575 MB/s | 780 MB/s |
55| Snappy 1.1.4 | 2.091 | 565 MB/s | 1950 MB/s |
56| [Zstandard] 1.4.0 -1 | 2.883 | 515 MB/s | 1380 MB/s |
57| LZF v3.6 | 2.073 | 415 MB/s | 910 MB/s |
58| [zlib] deflate 1.2.11 -1| 2.730 | 100 MB/s | 415 MB/s |
59|**LZ4 HC -9 (v1.9.0)** |**2.721**| 41 MB/s | **4900 MB/s** |
60| [zlib] deflate 1.2.11 -6| 3.099 | 36 MB/s | 445 MB/s |
61
62[zlib]: http://www.zlib.net/
63[Zstandard]: http://www.zstd.net/
64
65LZ4 is also compatible and optimized for x32 mode,
66for which it provides additional speed performance.
67
68
69Installation
70-------------------------
71
72```
73make
74make install # this command may require root permissions
75```
76
77LZ4's `Makefile` supports standard [Makefile conventions],
78including [staged installs], [redirection], or [command redefinition].
79It is compatible with parallel builds (`-j#`).
80
81[Makefile conventions]: https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
82[staged installs]: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
83[redirection]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
84[command redefinition]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html
85
86### Building LZ4 - Using vcpkg
87
88You can download and install LZ4 using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
89
90 git clone https://github.com/Microsoft/vcpkg.git
91 cd vcpkg
92 ./bootstrap-vcpkg.sh
93 ./vcpkg integrate install
94 vcpkg install lz4
95
96The LZ4 port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
97
98Documentation
99-------------------------
100
101The raw LZ4 block compression format is detailed within [lz4_Block_format].
102
103Arbitrarily long files or data streams are compressed using multiple blocks,
104for streaming requirements. These blocks are organized into a frame,
105defined into [lz4_Frame_format].
106Interoperable versions of LZ4 must also respect the frame format.
107
108[lz4_Block_format]: doc/lz4_Block_format.md
109[lz4_Frame_format]: doc/lz4_Frame_format.md
110
111
112Other source versions
113-------------------------
114
115Beyond the C reference source,
116many contributors have created versions of lz4 in multiple languages
117(Java, C#, Python, Perl, Ruby, etc.).
118A list of known source ports is maintained on the [LZ4 Homepage].
119
120[LZ4 Homepage]: http://www.lz4.org
121