Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 609462 | Differences between
and this patch

Collapse All | Expand All

(-)a/pym/portage/util/compression_probe.py (-2 / +4 lines)
Lines 18-23 _decompressors = { Link Here
18
	"lzip": "lzip -d",
18
	"lzip": "lzip -d",
19
	"lzop": "lzop -d",
19
	"lzop": "lzop -d",
20
	"xz": "xz -d",
20
	"xz": "xz -d",
21
	"zstd": "zstd -d",
21
}
22
}
22
23
23
_compression_re = re.compile(b'^(' +
24
_compression_re = re.compile(b'^(' +
Lines 26-32 _compression_re = re.compile(b'^(' + Link Here
26
	b'(?P<lz4>(?:\x04\x22\x4d\x18|\x02\x21\x4c\x18))|' +
27
	b'(?P<lz4>(?:\x04\x22\x4d\x18|\x02\x21\x4c\x18))|' +
27
	b'(?P<lzip>LZIP)|' +
28
	b'(?P<lzip>LZIP)|' +
28
	b'(?P<lzop>\x89LZO\x00\x0d\x0a\x1a\x0a)|' +
29
	b'(?P<lzop>\x89LZO\x00\x0d\x0a\x1a\x0a)|' +
29
	b'(?P<xz>\xfd\x37\x7a\x58\x5a\x00))')
30
	b'(?P<xz>\xfd\x37\x7a\x58\x5a\x00)|' +
31
	b'(?P<zstd>([\x22-\x28]\xb5\x2f\xfd)))')
30
32
31
_max_compression_re_len = 9
33
_max_compression_re_len = 9
32
34
Lines 41-46 def compression_probe(f): Link Here
41
		lzip
43
		lzip
42
		lzop
44
		lzop
43
		xz
45
		xz
46
		zstd
44
47
45
	@param f: a file path, or file-like object
48
	@param f: a file path, or file-like object
46
	@type f: str or file
49
	@type f: str or file
47
- 

Return to bug 609462