Skip to content

archiveinfo() UnsupportedCompressionMethodError with BCJ archive #100

@ganego

Description

@ganego

Describe the bug
py7zr throws UnsupportedCompressionMethodError when opening a file and retrieving .archiveinfo()

To Reproduce
Create a BCJ archive: 7z a -mf=BCJ test.7z test.txt (create some test.txt before...)
Verify with 7z that it's BCJ - my archive was LZMA:12k BCJ.
Open file with 7zr and use archiveinfo().

import py7zr
archive = py7zr.SevenZipFile('test.7z', 'r').archiveinfo()

Crash:

File "...\py7zr\compression.py", line 433, in get_methods_names
    methods_names.append(methods_name_map[coder['method']])
KeyError: b'\x03\x03\x01\x03'

Environment (please complete the following information):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions