Changaco / python-libarchive-c

Python interface to libarchive
Other
70 stars 37 forks source link

Writing 7zip file #92

Closed achapkowski closed 2 years ago

achapkowski commented 5 years ago

Hello,

What is the syntax to write a 7z file?

Reading is simple:

with libarchive.file_reader('test.7z') as archive:
    for entry in archive:
        for block in entry.get_blocks():

The help just shows the following:

file_writer(filepath, format_name, filter_name=None, archive_write_class=<class 'libarchive.write.ArchiveWrite'>, options='')

So what is the format_name options? What do I put for the filter_name?

Also if I have a compressed file, is there a way to get all this information from that file to copy it exactly and just add new contents?

achapkowski commented 2 years ago

@Changaco thank you for the doc updates