MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / decompress

Method decompress

pgpy/constants.py:336–349  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

334 raise NotImplementedError(self)
335
336 def decompress(self, data):
337 if self is CompressionAlgorithm.Uncompressed:
338 return data
339
340 if self is CompressionAlgorithm.ZIP:
341 return zlib.decompress(data, -15)
342
343 if self is CompressionAlgorithm.ZLIB:
344 return zlib.decompress(data)
345
346 if self is CompressionAlgorithm.BZ2:
347 return bz2.decompress(data)
348
349 raise NotImplementedError(self)
350
351
352class HashAlgorithm(IntEnum):

Callers 1

parseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected