@contact: frank.brehm@pixelpark.com
@copyright: © 2017 by Frank Brehm, Berlin
@summary: The module for a AnyUmpressFile class
+$Id: $
"""
from __future__ import absolute_import
# Third party modules
import six
-__version__ = '0.1.0'
+__version__ = '0.2.0'
# =============================================================================
# =============================================================================
class AnyUmpressFile(object):
- pass
+ compression_types = {
+ '7z': {
+ 'mime_types': ('application/x-7z-compressed', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'bz2': {
+ 'mime_types': ('application/x-bzip2', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'compress': {
+ 'mime_types': ('application/x-compress', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'gzip': {
+ 'mime_types': ('application/gzip', 'application/x-gzip'),
+ 'supported': True,
+ 'method': None,
+ }
+ 'lz4': {
+ 'mime_types': ('application/x-lz4', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'lzma': {
+ 'mime_types': ('application/x-lzma', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'rar': {
+ 'mime_types': ('application/x-rar', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'xz': {
+ 'mime_types': ('application/x-xz', ),
+ 'supported': False,
+ 'method': None,
+ },
+ 'zip': {
+ 'mime_types': ('application/zip', ),
+ 'supported': False,
+ 'method': None,
+ },
+ }
+
+ # -------------------------------------------------------------------------
+ def __init__(self, fh, compress_type=None):
+
+ self.fh = fh
+ self.compress_type = compress_type
# =============================================================================