opened
goldenbull
username_0
lzma is suitable for some special scenarios which need higher compression ratio and faster decompression speed, and do not care about compression speed.
Any plan for lzma/xz format?
issue
created
McNeight
username_1
Chen,

At the moment I am focused more on cleaning up the existing code and bug fixing, rather than adding new features. Hopefully soon, we can take a look at incorporating lzma/xz into our project.

-Neil
comment
created
goldenbull
username_0
Thanks for your reply. I have created a ManagedXZ project to interop with the native liblzma.dll. Maybe it's possible to re-compile the lzma source code in C++/cli, but I didn't try.
comment
created
McNeight
username_1
I discovered that Igor Pavlov has a written a [public domain LZMA SDK](http://www.7-zip.org/sdk.html) with an implementation in C#. I'll take a look at what it will take to integrate his code into the library, but no guarantees on a timeline.

-Neil
comment
created
goldenbull
username_0
A simple comparison of LZMA C# SDK and liblzma.dll from http://tukaani.org/xz/

LZMA C# SDK
- supports only LZMA, not LZMA2, so doesn't support parallel compression
- pure C# implementation, platform independent but bad performance compared to native C/C++ implementation

liblzma.dll from http://tukaani.org/xz/
- supports both LZMA and LZMA2, so can compress in parallel (this is important to me when I have a powerful server with 40 CPU cores)
- native C implementation results in high performance but platform dependent
comment
created
goldenbull
username_0
I found the Java implementation of XZ Utils here: http://tukaani.org/xz/java.html
Maybe we can try translate the Java source code into C# :smile:
comment
created
goldenbull
username_0
Well, further investigation shows that Java implementation supports only single thread yet, and the LZMA C# SDK from 7-zip is the translation as I meant :disappointed:
comment
created
gigi81
username_2
There is also another C# porting of the LZMA library here:
https://github.com/weltkante/managed-lzma
Not sure what is the status of the project and how it compares in terms of performance.
comment
created
goldenbull
username_0
@username_2 I haven't dived into the C# code yet, but to my knowledge, compression algorithm needs to access memory heavily, which is much slower in C# even with unsafe pointer.
comment
closed
goldenbull
username_0
issue