Addition of LZMA and LZMA2 to compression options and packaging


Once System.IO.Compression is added to the repository it would be nice to have the LZMA and LZMA2 compression algorithms added so .NET developers can generate and read .7z files directly. It would also be nice if this were an option for OPC packages since it can save a large amount of space/bandwidth depending on the files included in the packages.


There is nothing holding you back from creating a pull request with said feature!


For reference, I’ve done a semi-automatical translation of LZMA (both 1 and 2) to managed code. The project is usable but not completed.

The original goal was to provide one code base and project it into two variants via Roslyn, one using unmanaged memory for performance and one using arrays with offsets to be usable in scenarios where interop code is not allowed. This projection isn’t finished yet and I’m currently not working on it because a lack of time, also the performance doesn’t look that great compared to just calling a C/C++ compiled implementation.

If there is reason and interest to favor a managed LZMA implementation over a native one I may be able to contribute on such a project.

EDIT: just moved the repository to github, may pickup the refactoring soon

.NET Foundation Website | Blog | Projects | Code of Conduct