def encode(self, flash):
     """Encodes the given *flash* as a zlib compressed JSON string.
     """
     return zlib.compress(JSONCodecClass.encode(self, flash))
 def decode(self, encoded_flash):
     """Restores the *flash* from the given zlib compressed JSON string.
     """
     return JSONCodecClass.decode(self, zlib.decompress(encoded_flash))
 def __init__(self):
     """Returns a new JSON/zlib-based codec.
     """
     JSONCodecClass.__init__(self)