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