You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/partd/compressed.py

46 lines
973 B

6 years ago
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')