support zstd
This commit is contained in:
parent
1c57c0332e
commit
a1c0212e09
|
@ -15,6 +15,7 @@ import tarfile
|
|||
from collections import defaultdict
|
||||
from gzip import GzipFile
|
||||
import lzma
|
||||
import pyzstd
|
||||
from email import message_from_string, message_from_file
|
||||
from functools import cmp_to_key
|
||||
|
||||
|
@ -28,7 +29,8 @@ REQUIRED_HEADERS = ('package', 'version', 'architecture')
|
|||
|
||||
control_openers = {
|
||||
'gz': lambda fob: GzipFile(fileobj=fob),
|
||||
'xz': lambda fob: lzma.open(fob, "r")
|
||||
'xz': lambda fob: lzma.open(fob, "r"),
|
||||
'zst': lambda fob: pyzstd.open(fob, "r")
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue