Reputation: 6806
We've got a .NET Core app that was hosted in Azure Service Fabric. Now we are moving it to Linux-based Docker containers.
We need to be able to create 7zip archives for an external service (one of those fancy "drop your files here via ftp" interfaces which requires 7zip archives).
Until now we could use a CLI wrapper ported from .NET Framework to .NET Core. But that does no longer work once we switch to a Linux environment.
We can't change the external service (because it is not ours) and we don't want to use Windows-based Docker containers.
There is a large number of 7zip NuGet packages for .NET Framework. Very few for .NET Core (mostly outdated and no longer maintained). And none I could find for .NET Core on Linux.
Do you have any suggestions on how we could solve that issue?
UPDATE: I found one similar question among the open issues of the SevenZipSharp project. Sadly there is no solution included.
UPDATE 2: Unfortunately we can't use an alternative implementation of the LZMA algorithm. Our 3rd party requires archives in the .7z format :-(
Upvotes: 2
Views: 2106
Reputation: 1825
This is not an answer as it doesn't really provide a solution to the question, but it does address why it unlikely there will come an updated 7Zip library for Linux and address the problem with a good LZMA OS-cross-platform compression engine. So it should be seen as a long Comment, I hope it's okay.
It seems 7Zip is not maintained on Linux at all, current library is rather old, and I don't trust it's compatibility with the current and newer Windows 7Zip versions, so in my view 7Zip on Linux is a no-go. It's my understanding that Igor Pavlov (creator and maintainer of Zip) only target Windows. And he's not the creator of the current and old Linux 7Zip library.
A LZMA compression engine with both Linux and Windows support is LZip (.lz).
The latest library (zlib) is 1.11 and in July 2019 I sent a request to Domani Hannes to compile a new Windows version and he was to kind to reply with a download link and the following message:
I just now built plzip-1.8 with lzlib-1.11 and mingw-w64-winpthreads-v6.0.0.
There are no longer modifications necessary to be able to compile for Windows, so it's pretty straightforward.
I guess it mean it's easy to compile newer Windows versions in the future too.
Download link to this binary: plzip_zlib_1.11.exe.
I haven't have time to test it thoroughly yet for my own project, so if anyone go down this path please share your experiences (with a risk of hijacking this thread, so maybe not :-P).
Upvotes: 2