What is the fastest way in python to determine if a zlib string has been compressed. I am using this currently.
def iscompressed(data): result = True try: s =zlib.decompress(data) except: result = False return result
I am sure there is a more elegant way.
LouisChiffre
source share