Skip to content

implementation of the lzo decoder in plain c#/.NET

License

Notifications You must be signed in to change notification settings

zivillian/lzo.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status Nuget version

lzo.net

This is an implementation of the lzo decoder in plain c#/.NET (without P/Invoke, fixed or unchecked).

The first version was based on the decoder from ffmpeg, but was replaced with a rewrite based on the documentation from kernel.org.

Features

Currently only decompression is supported.

License

The early versions contain a port from ffmpeg, which is licensed under LGPL v2.1. Later version do not contain any LGPL code anymore, so the license was switched to MIT. Details can be found in the LICENSE file for each version.

Usage

Install from nuget.

using (var compressed = File.OpenRead("File.lzo"))
using (var decompressed = new LzoStream(compressed, CompressionMode.Decompress))
{
    decompressed.Read(buffer, offset, count);
    ...
}

Performance

The code was optimized as much as possible but since it's plain .NET it is of course slower then the native c version. Benchmarks (on the test files) show a performance penalty around factor 3. If you require the best performance, consider using another library which wraps the native version.

Please open an issue, if you've found a way to make the decoder faster.

About

implementation of the lzo decoder in plain c#/.NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages