Function to get headers from RAR files

This commit is contained in:
Kovid Goyal 2023-03-09 11:51:15 +05:30
parent 5725b1cd2c
commit 60e8a67dcf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -61,6 +61,14 @@ def names(path_or_stream):
yield from names(path, only_useful=True)
def headers(path_or_stream):
from unrardll import headers, is_useful
with StreamAsPath(path_or_stream) as path:
for h in headers(path):
if is_useful(h):
yield h
def comment(path_or_stream):
from unrardll import comment
with StreamAsPath(path_or_stream) as path: