/usr/lib/python3/dist-packages/partd/compressed.py is in python3-partd 0.3.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | from .utils import ignoring
from .encode import Encode
from functools import partial
__all__ = []
def bytes_concat(L):
return b''.join(L)
with ignoring(ImportError):
import snappy
Snappy = partial(Encode,
snappy.compress,
snappy.decompress,
bytes_concat)
__all__.append('Snappy')
with ignoring(ImportError):
import zlib
ZLib = partial(Encode,
zlib.compress,
zlib.decompress,
bytes_concat)
__all__.append('ZLib')
with ignoring(ImportError):
import bz2
BZ2 = partial(Encode,
bz2.compress,
bz2.decompress,
bytes_concat)
__all__.append('BZ2')
with ignoring(ImportError):
import blosc
Blosc = partial(Encode,
blosc.compress,
blosc.decompress,
bytes_concat)
__all__.append('Blosc')
|