Skip to content
  • Elvis Angelaccio's avatar
    libarchive: add support for unencrypted 7-zip · a751cf8c
    Elvis Angelaccio authored
    libarchive can extract 7-zip archives and also create them, with full
    support for all the expected compression methods available in the 7-zip
    format.
    
    This commit enables the 7-zip format in the libarchive plugin, which makes
    Ark always able to provide basic support for 7z archives. This was
    currently possible only when the 7z binary is installed on the system,
    which may not be always true (some distributions don't ship a 7z binary
    by default).
    
    Unfortunately libarchive doesn't support encrypted 7z archives yet,
    which means this cannot be a drop-in replacement for the 7z plugin.
    Also it doesn't allow to create multi-volume files.
    
    But it is a first step towards deprecating the 7z plugin. This plugin has not
    been always reliable in the past, since it needs to parse the CLI output
    of the 7z binary. And there is the additional problem of the p7zip/7-zip
    upstream projects being weirdly maintained.
    
    Note: the minimum supported compression level is 1 instead of 0 (unlike
    the 7z plugin), since the bzip2 library (used by libarchive) doesn't
    accept 0 as minimum value and it would be too complicated to use
    different value ranges for different compression methods.
    
    CCBUG: 468240
    a751cf8c
Loading