Name Date Size #Lines LOC

..--

lib/H25-Apr-2025-6,0513,791

MakefileH A D25-Apr-20252.2 KiB9957

NEWSH A D25-Apr-20258.1 KiB186158

README.mdH A D25-Apr-20254.1 KiB9170

lz4_Block_format.mdH A D25-Apr-20254.8 KiB12893

lz4_Frame_format.mdH A D25-Apr-202512.4 KiB386263

README.md

1LZ4 - Extremely fast compression
2================================
3
4LZ4 is lossless compression algorithm,
5providing compression speed at 400 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 more speed up.
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 library is provided as open-source software using BSD license.s
18
19
20|Branch      |Status   |
21|------------|---------|
22|master      | [![Build Status][travisMasterBadge]][travisLink] [![Build status][AppveyorMasterBadge]][AppveyorLink] [![coverity][coverBadge]][coverlink] |
23|dev         | [![Build Status][travisDevBadge]][travisLink]    [![Build status][AppveyorDevBadge]][AppveyorLink]                                         |
24
25[travisMasterBadge]: https://travis-ci.org/Cyan4973/lz4.svg?branch=master "Continuous Integration test suite"
26[travisDevBadge]: https://travis-ci.org/Cyan4973/lz4.svg?branch=dev "Continuous Integration test suite"
27[travisLink]: https://ci.appveyor.com/project/YannCollet/lz4
28[AppveyorMasterBadge]: https://ci.appveyor.com/api/projects/status/v6kxv9si529477cq/branch/master?svg=true "Visual test suite"
29[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/v6kxv9si529477cq/branch/dev?svg=true "Visual test suite"
30[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/lz4
31[coverBadge]: https://scan.coverity.com/projects/4735/badge.svg "Static code analysis of Master branch"
32[coverlink]: https://scan.coverity.com/projects/4735
33
34> **Branch Policy:**
35
36> - The "master" branch is considered stable, at all times.
37> - The "dev" branch is the one where all contributions must be merged
38    before being promoted to master.
39>   + If you plan to propose a patch, please commit into the "dev" branch,
40      or its own feature branch.
41      Direct commit to "master" are not permitted.
42
43Benchmarks
44-------------------------
45
46The benchmark uses the [Open-Source Benchmark program by m^2 (v0.14.3)]
47compiled with GCC v4.8.2 on Linux Mint 64-bits v17.
48The reference system uses a Core i5-4300U @1.9GHz.
49Benchmark evaluates the compression of reference [Silesia Corpus]
50in single-thread mode.
51
52|  Compressor          | Ratio   | Compression | Decompression |
53|  ----------          | -----   | ----------- | ------------- |
54|  memcpy              |  1.000  | 4200 MB/s   |   4200 MB/s   |
55|**LZ4 fast 17 (r129)**|  1.607  |**690 MB/s** | **2220 MB/s** |
56|**LZ4 default (r129)**|**2.101**|**385 MB/s** | **1850 MB/s** |
57|  LZO 2.06            |  2.108  |  350 MB/s   |    510 MB/s   |
58|  QuickLZ 1.5.1.b6    |  2.238  |  320 MB/s   |    380 MB/s   |
59|  Snappy 1.1.0        |  2.091  |  250 MB/s   |    960 MB/s   |
60|  LZF v3.6            |  2.073  |  175 MB/s   |    500 MB/s   |
61|  zlib 1.2.8 -1       |  2.730  |   59 MB/s   |    250 MB/s   |
62|**LZ4 HC (r129)**     |**2.720**|   22 MB/s   | **1830 MB/s** |
63|  zlib 1.2.8 -6       |  3.099  |   18 MB/s   |    270 MB/s   |
64
65
66Documentation
67-------------------------
68
69The raw LZ4 block compression format is detailed within [lz4_Block_format].
70
71To compress an arbitrarily long file or data stream, multiple blocks are required.
72Organizing these blocks and providing a common header format to handle their content
73is the purpose of the Frame format, defined into [lz4_Frame_format].
74Interoperable versions of LZ4 must respect this frame format.
75
76
77Other source versions
78-------------------------
79
80Beyond the C reference source,
81many contributors have created versions of lz4 in multiple languages
82(Java, C#, Python, Perl, Ruby, etc.).
83A list of known source ports is maintained on the [LZ4 Homepage].
84
85
86[Open-Source Benchmark program by m^2 (v0.14.3)]: http://encode.ru/threads/1371-Filesystem-benchmark?p=34029&viewfull=1#post34029
87[Silesia Corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
88[lz4_Block_format]: lz4_Block_format.md
89[lz4_Frame_format]: lz4_Frame_format.md
90[LZ4 Homepage]: http://www.lz4.org
91