compressor.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:covertutils 作者: operatorequals 项目源码 文件源码
def decompress( self, zipped ) :
        """
This funtion performs all provided decompression algorithm to the provided data.
Based on the assumption that any decompression algorithm raises an Exception if the compressed data is not compatible, it finds the used compression algorithm and returns the decompressed data.

:param str message: The data to be compressed in raw bytes.
:rtype: str
:return: Data compressed by most efficient available algorithm.

"""
        plain = zipped
        for decomp in self.decomps :
            try :
                unzipped = decomp( zipped )
                return unzipped
            except :
                pass

        return plain
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号