No announcement yet.

Request: use archive plugins as converters in file format definitions.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Request: use archive plugins as converters in file format definitions.

    Many compression methods support both archives, for example zip or 7z and single file compression -.gzip or .xz
    The difference is that archive may contain multiple files, and is more like a folder. Single file compression is more like a file format.
    Treating single compressed files as archives is fast, because plugin code runs in process, but awkward in the UI because every such file has two folder levels - compressed archive, and uncompressed content.
    Instead, in my company, we define a file format (for example .xml.xz) that uses an external decompressor.
    That is convenient - every file gets converted to text behind the scenes, and appears only once in the UI, but slow. In our tests TotalZip archiver plugin is 60 times faster than spawning a command line 7zip.
    The request is simple: in the file formats conversion source, support using an archiver plugin for single file conversion. In that mode the archiver would function as a converter, and report an error for corrupted archives, or for archives with more than one entry.
    Doing this would magically enable gzip, and xz etc, and allow using Total Commander plugins as converters, not just archivers.


  • #2
    The File Format can have any command line set as the External Conversion. Assuming text, a Text format would take in an input, then as long as it passes back a temp.txt output, that is the file that would be opened when launching the Text Compare. This wouldn't use our built-in archiving support, but if you have an archive program that can perform this conversion on the Command line for *.txt.xz, a format can be defined to perform the conversion.

    In the current version, we still treat archives as folders since most contain an unknown number of files, and also to show the expanded/unpacked state as a folder, vs. the archive as a file, since Beyond Compare can scan/compare either the archive as a file or the contents within the archive.
    Aaron P Scooter Software


    • #3
      I am bumping up request for more intuitive handling of the compressed files (aka single-file archives), by having ability to forward comparison from the compressed file, to its decompressed content.
      In our company we did write a batch file that calls 7zip on xml.xz files, and added it to the "xml.xz" file format external converter, but after 4.1 upgrade xz is an included file format, and it takes precedence - so xz files are always treated as folders, never as a format to convert. To get "click once to compare" ui we had to switch all archive handling to "As files always" in the session settings, to hack around to desired behavior (which of course loses desired functionality for real archives, such as zips). We frequently compare hundreds of files (in the hierarchy of several thousands), so clicking twice (compressed file+content file) is a real drag.
      There would be several possible options to make us happy (which I am sure is your singular purpose in life):
      a) Add "treat as compressed single file" option to to archive definitions
      b) have a "single file archive" file format converter (in addition to existing external converter), and have "file format" logic dominate over "archive" extension matching.
      c) Add "pass-through to single contained file" in "Session Settings"->Archive Handling

      In all of these situations, if archive has more than one file BC could treat it same as an invalid archive format and fail conversion.
      Last edited by geneg102; 24-Mar-2016, 10:23 AM.


      • #4

        We did expand and add additional archive types in 4.1. You can get back your old behavior by disabling any archive type you do not want treated this way in the Tools menu -> Options dialog, Archive Types section. Scroll to the Xz and tar.xz section, then delete the *.extensions present in their definitions. Then restart the application to apply these changes.

        A single file archive definition is something we can consider, possibly treated similarly to symbolic links, but is a larger project than it might appear from a UI perspective. It's on our Customer Wishlist, but I would suggest implementing the workaround as it is not a currently scheduled project we would be able to tackle soon.
        Aaron P Scooter Software