Menu

OpenArchive.cpp voodoo

2023-08-26
2023-08-27
  • Robert Simpson

    Robert Simpson - 2023-08-26

    There's about 1500 lines of mystical file-open voodoo in OpenArchive::OpenStream2 that does a huge amount of gymnastics to figure out which codec to use, where to look, what order the codecs go in, and ... well, generally a ton of "magic" with almost no code comments to describe the workflow.

    Is there any thought to moving all of that logic into its own exportable function in 7z.dll such that one could just call an entrypoint like OpenArchive, passing in callbacks and so forth, and getting back a proper IInArchive object back?

     
  • Robert Simpson

    Robert Simpson - 2023-08-26

    Incidentally, this is how I found the UEFI thing. I was trying to walk that code and implement the same sort of functionality in .NET.

     
  • Igor Pavlov

    Igor Pavlov - 2023-08-27

    Yes, that code is complicated, because we need to support sfx archives and we support also "parser" mode. Also some archive types have no good signatures and headers. Also we support archive in archive, like ntfs inside vhd.

    It's possible to include that code to 7z.dll. But there was no such request before. Actually some 7z.dll users probably implement same things with another ways already, because they could support another fomats already.

     

    Last edit: Igor Pavlov 2023-08-27

Log in to post a comment.