miurahr / py7zr

7zip in python3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2, and Deflate compressions, and AES encryption.
https://pypi.org/project/py7zr/
GNU Lesser General Public License v2.1
463 stars 74 forks source link

feat: add `getinfo()` #609

Closed Ravencentric closed 3 months ago

Ravencentric commented 3 months ago

Pull request type

Which ticket is resolved?

What does this PR change?

Implement ZipFile's getinfo https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.getinfo

Ravencentric commented 3 months ago

One thing to note, getinfo accepts names ending with or without / (similar to TarFile). This allows for more interoperability with ZipFile. Do let me know if we don't want to support this. If we do want to support this, I reckon it should be done on other methods too like extract() and read() too

miurahr commented 3 months ago

LGTM.