p7zip-project / p7zip

A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/sevenzip/ AND https://sourceforge.net/projects/p7zip/).
759 stars 106 forks source link

Implement ZSTD and other compression methods as standalone ".so" files. #53

Open ghost opened 4 years ago

ghost commented 4 years ago

Most people use p7zip provided by the repo and we should not mess with the main program files. Due to this reason, the only viable solution is to make ZSTD as "additional codecs", like the RAR one.

jinfeihan57 commented 4 years ago

Thanks, I will look at it.

ghost commented 3 years ago

@jinfeihan57 Specifically, build a special "7z.so" with only these codecs and hashes, and place them in the Codecs folder:

 2  ED       21 FLZMA2
 2  ED  4F71106 LIZARD
 2  ED  4F71104 LZ4
 2  ED  4F71105 LZ5
 2  ED  4F71101 ZSTD
 2  ED  4F71102 BROTLI

 2   16      205 MD2
 2   16      206 MD4
 2   16      207 MD5
 2   48      208 SHA384
 2   64      209 SHA512
 2    4      203 XXH32
 2    8      204 XXH64
cielavenir commented 2 years ago

my fork targets it: https://github.com/cielavenir/7-Zip-PKImplode/tree/c2891144efabe99958d95838a9b0c2f4f3d6b61b/CPP/7zip/Compress/Zstd

because my fork's main purpose is to add PKImplode, which is not mainstream and I need to publish as standalone codec.

as I finished updating p7zip's 7zip branch to 21.07, after updating directory structure I think I can setup standalone codecs.

tansy commented 2 years ago

my fork targets it: https://github.com/cielavenir/7-Zip-PKImplode/tree/c2891144efabe99958d95838a9b0c2f4f3d6b61b/CPP/7zip/Compress/Zstd

It just moves it to separate directory but still in 7zip source tree, so to speak. I think, and @jinfeihan57 agreed to it, they should be moved out of 7zip main/mainstream source completely. I actually make a lizard in Codecs directory as standalone shared object library/7zip-codec. It still would require to make it possible to include as statically embedded into application, as it is now.

I just thought up that if it was moved to separate, "external" (to the main source) `Codecs\' directory then there would be a makefile for .so codec and makefile for embedded one and the latter could be included with include directive in 7z (7zz/7za/7zr...) makefile. That would solve problem of maintaining the source code to adding few lines to possibly new makefile. That's it.

cielavenir commented 2 years ago

I believe what @jinfeihan57 agreed was to move compression algorithms, not those 7-zip bindings.