I tried to make a codec (let's call it plugin codec in opposition to archive codec) for lzip in that case, so I don't have to patch every new release as it's annoying like hell. I thought it would be trivial, as pretty much everything is codec/plugin in 7zip but it turned out to be much more complicated. I found that unlike main/official 7zip release you do have few codecs made as plugins which is really cool but still don't understand it. Codec.def provides symbols that are to be exported in .so/.dll but I checked all your released codecs sources and they are not defined anywhere which perplexes me. I have no Idea how to get to that and what to do even with clear examples of working plugins.
So first what is the meaning of these methods****, is that all symbols I provide for export to make it work and how do I change existing archive codec, for example $_7ZIP_SRC/CPP/7zip/Archive/LzHandler.cpp or .../Bzip2Handler.cpp, whatever, simpler the better.
I just noticed, that for lizard, for example, there is either plugin and archive codec definitions. Is that redundancy or is it really a dynamic plugin or it is embedded archive codec?
* plugin codecs are shared objects/dll that can be simply added dynamically to 7zip, with exports defined in $_7ZIP_SRC/CPP/7zip/Compress/Codec.def where archive codecs are wired/embedded into 7zip and cannot be dynamically added/removed, their exports are defined in $_7ZIP_SRC/CPP/7zip/Archive/Archive.def or .../Archive2.def.
I tried to make a codec (let's call it plugin codec in opposition to archive codec) for lzip in that case, so I don't have to patch every new release as it's annoying like hell. I thought it would be trivial, as pretty much everything is codec/plugin in 7zip but it turned out to be much more complicated. I found that unlike main/official 7zip release you do have few codecs made as plugins which is really cool but still don't understand it.
Codec.def
provides symbols that are to be exported in .so/.dll but I checked all your released codecs sources and they are not defined anywhere which perplexes me. I have no Idea how to get to that and what to do even with clear examples of working plugins.So first what is the meaning of these methods****, is that all symbols I provide for export to make it work and how do I change existing archive codec, for example
$_7ZIP_SRC/CPP/7zip/Archive/LzHandler.cpp
or.../Bzip2Handler.cpp
, whatever, simpler the better.I just noticed, that for lizard, for example, there is either plugin and archive codec definitions. Is that redundancy or is it really a dynamic plugin or it is embedded archive codec?
* plugin codecs are shared objects/dll that can be simply added dynamically to 7zip, with exports defined in
$_7ZIP_SRC/CPP/7zip/Compress/Codec.def
where archive codecs are wired/embedded into 7zip and cannot be dynamically added/removed, their exports are defined in$_7ZIP_SRC/CPP/7zip/Archive/Archive.def
or.../Archive2.def
.** brotli, flzma, lizard, zstd
** `$ find $_7ZIP_SRC -iname lizard\ -exec grep CreateEncoder {} ";"` gives nothing
**** Codec.def: CreateDecoder, CreateEncoder, CreateObject, GetMethodProperty, GetNumberOfMethods