EasyLZ 0.1.1-alpha

.NET Standard 2.0
This is a prerelease version of EasyLZ.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package EasyLZ --version 0.1.1-alpha
NuGet\Install-Package EasyLZ -Version 0.1.1-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyLZ" Version="0.1.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyLZ --version 0.1.1-alpha
#r "nuget: EasyLZ, 0.1.1-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasyLZ as a Cake Addin
#addin nuget:?package=EasyLZ&version=0.1.1-alpha&prerelease

// Install EasyLZ as a Cake Tool
#tool nuget:?package=EasyLZ&version=0.1.1-alpha&prerelease


EasyLZ is a compression algorithm based on LZ77 that uses a byte to store the length and distance of the copy in the dictionary.

The compression flow occurs with a byte code that each bit (from largest to smallest) informs whether the next byte of the flow is literal or copies.


byte code = 0b11111111; // next 8 bytes of the stream are literal
byte code = 0b00000000; // next 8 bytes of the stream are copies
byte code = 0b11111110; // of the next 8 bytes of the stream, the first 7 are literal and the last is a copy


byte[] compressed = new byte[EasyLZ.MaxLengthRawEncode(data.Length)];
int length = EasyLZ.Encode(data, 2, compressed);


byte[] decompressed = EasyLZ.Decode(data);

Literal byte

A literal byte is an uncompressed byte of the stream that must be copied to the output stream.

Copy byte

A copy byte is a compressed byte divided into two-bit regions.

The first region + 2 stores the size of the compressed bytes (copy size) and the second part + 1 stores the distance of the output stream to the first byte that will be copied.

The delimiter of what is the first part and second part is the first byte of the stream.


byte firstByte = 2; // first 2 most significant bits of the byte are for length and the other 6 bits for offset
byte copyByte = 0b01000001 // copies 3 bytes from 2 offset backwards from the current output stream to the output stream
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EasyLZ:

Package Downloads

A bitmap format is simple but can be compressed with Deflate, LZ4, RLE and EasyLZ.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.2-alpha 174 3/18/2021
0.2.1-alpha 207 1/21/2021
0.2.0-alpha 372 8/2/2020
0.1.1-alpha 407 5/26/2020