iquercorb / OpenModMan

Open Mod Manager - Open source and generic Mod ("Modifications") manager.
GNU General Public License v3.0
91 stars 5 forks source link

Suggestion: 7Zip Archive Support for Packages #20

Closed retroluxfilm closed 10 months ago

retroluxfilm commented 2 years ago

On large packages it can significantly reduce the file size of an archive when using 7zip instead of regular zip deflate compression. Currently preparing all the packages for OMM but noticed that a few packages where over 1GB larger. This would take longer to download by the user and waste bandwith downloading these bigger files.

grafik grafik

iquercorb commented 2 years ago

There is no ready-to-use library to create 7z files. The LZMA SDK only offer a simple file extractor as example, all informations about 7z format is non-official and strictly theoretical (no examples, or not easy to found)... This mean that at this stage , support for 7z format imply to code a whole library for 7z file creation. Another way to say it, I have the bricks and beams, but I have to put them together by myself to build the house... This mean, a lot of time, and at this stage since I have to create everything by myself (except the LZMA compression library), the only reason to fit the 7z format is to stay compatible with other software... I will think about a 7z or XZ support, or, maybe, an home-made LZMA2 based file format, but don't hope it for a near future.

retroluxfilm commented 2 years ago

I remember that the Java imlementation for 7z also still required a lot of hand work and it was not as ready made as initially thought. Found a library with C compress and decompress examples which might make the work easier if you plan to work on it. https://github.com/OlehKulykov/PLzmaSDK

Still glad that you are considering it at some point in the future, it will help to reduce the bandwith usage.

iquercorb commented 2 years ago

The library you proposed is not of my tast... The C API is actualy wrapped around the C++ code which is the real API, but itself is a wrapper of a deeper level, whichs is again a wrapper of deeper level... Too many files, too heavy, too complex. I tryed to found interesting source code of the 7z file creation process, but everything is scatered among dozen of small elementary objects, and absolutly nothing is documented... I better trying to follow the fuzzy non-official specifications from zero.

iquercorb commented 10 months ago

Support LZMA and LZMA2 as compression method for Zip files since the version 1.2

retroluxfilm commented 10 months ago

Nice one! Guess I need to prepare the PHP OMM library to the new 1.2 version to match the new format. (If anyone is using it)