You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Joveler.Compression.LZ4/NUGET_README.md
+11-5
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,19 @@ Joveler.Compression.LZ4 can be installed via [nuget](https://www.nuget.org/packa
10
10
11
11
## Performance
12
12
13
-
**WARNING**: The library supports many customizable options, but performance is a bit slow due to pinvoke overhead. See [README.md](https://github.com/ied206/Joveler.Compression/blob/master/Joveler.Compression.LZ4/README.md) for details.
13
+
**WARNING**: Due to LZ4's performant nature, P/Invoke overhead has a more negative effect on LZ4 than on conventional compression algorithms.
14
+
15
+
The overhead becomes trivial enough if you handle big files and focus on multithreaded high-level compression.
16
+
17
+
In decompression, pure managed implementation is much faster than this native wrapper.
18
+
19
+
See project README for more details.
14
20
15
21
## Features
16
22
17
23
- LZ4FrameStream, the stream for [lz4 frame format](https://github.com/lz4/lz4/blob/master/doc/lz4_Frame_format.md).
18
24
- (EXPERIMENTAL) Parallel compression support on LZ4FrameStream.
19
25
20
-
## Tested liblz4 versions
21
-
22
-
- 1.9.4 (Included)
23
-
24
26
## Support
25
27
26
28
### Targeted .NET platforms
@@ -45,3 +47,7 @@ Joveler.Compression.LZ4 can be installed via [nuget](https://www.nuget.org/packa
Copy file name to clipboardexpand all lines: Joveler.Compression.LZ4/README.md
+32-3
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,15 @@ Joveler.Compression.LZ4 can be installed via [nuget](https://www.nuget.org/packa
10
10
11
11
## Performance
12
12
13
-
Please keep in mind that `Joveler.Compression.LZ4` have been uploaded to the nuget because it supports many customizable options, not best in performance.
13
+
Due to LZ4's performant nature, P/Invoke overhead has a more negative effect on LZ4 than on conventional compression algorithms.
14
14
15
-
Decompression of `Joveler.Compression.LZ4` is similar or slightly faster than the pure C# implementation, [K4os.Compression.LZ4](https://github.com/MiloszKrajewski/K4os.Compression.LZ4). In the meanwhile the compression is about 50% faster to 2000% slower. Please be careful about performance when using it on production.
15
+
If you mostly handle big files and focus on multithreaded high-level compression, `Joveler.Compression.LZ4` is the right choice.
16
+
17
+
If you mostly handle small files and are focused on performant single-threaded use, consider using [K4os.Compression.LZ4](https://github.com/MiloszKjewski/K4os.Compression.LZ4), the pure C# implementation. Its performance generally ties in with the native pinvoke method.
18
+
19
+
Suppose your use case involves mostly decompression, use [K4os.Compression.LZ4](https://github.com/MiloszKjewski/K4os.Compression.LZ4) as it is consistently faster.
20
+
21
+
Read the [Benchmark](#Benchmark) section for more details.
16
22
17
23
## Features
18
24
@@ -56,7 +62,7 @@ See [CHANGELOG.md](./CHANGELOG.md).
56
62
57
63
`Joveler.Compression.LZ4` is licensed under [BSD 2-Clause license](./LICENSE).
58
64
59
-
## Performance
65
+
## Benchmark
60
66
61
67
### Compression
62
68
@@ -90,3 +96,26 @@ In multithread compression, performance of `Joveler.Compression.LZ4` scales line
90
96
| lz4 | reymont.pdf | Fastest | 13,985 μs |
91
97
| lz4-T2 | reymont.pdf | Fastest | 10,868 μs |
92
98
| K4os | reymont.pdf | Fastest | 15,343 μs |
99
+
100
+
### Decompression
101
+
102
+
[K4os.Compression.LZ4](https://github.com/MiloszKrajewski/K4os.Compression.LZ4) is about twice faster than `Joveler.Compression.LZ4`.
0 commit comments