Support LZ4 compression in .NET Core


lz4net has been deprecated and moved to K4os.Compression.LZ4. The new library specifically exposes an API to read files created with the "legacy" library (lz4net). Also the new library is listed under the "Interoperable ports" section while lz4net is listed under the "Custom ports" section.

For these reasons, compatibility between these two libraries is not 100% guaranteed so we should only replace lz4net on a major version to be safe and mention this on the upgrade guide (see ).

Before the next major, we can introduce support for LZ4 compression on netstandard2.0 by importing K4os.Compression.LZ4 on netstandard2.0 only and keeping the legacy lz4net on net452.




Joao Reis
May 4, 2020, 11:07 AM

Scope of has been changed to "support for lz4 in .NET Core".

was created to replace legacy lz4net with the new library.

Joao Reis
May 4, 2020, 10:58 AM

+1 to removing lz4net on C# 4.0, we will merge and release it on 3.15.0

Aleksei Kharlov
April 30, 2020, 6:48 PM

In PR I’ve added K4os.Compression.LZ4 fon netstandard2.0 target only. For .NET Framework target lz4net is still used.

Please, confirm that we could release it in C# driver 3.15.0 version?

In v4.0.0 P-MAJOR-NEXT you could remove lz4net completely and use K4os.Compression.LZ4 for all targets.





Jorge Bay Gondra

Fix versions