(self, data)
| 58 | return data |
| 59 | |
| 60 | def deserialize(self, data): |
| 61 | if self.comp: |
| 62 | if not is_compressed(data): |
| 63 | logger.warning('compression enabled but message data does not ' |
| 64 | 'appear to be compressed.') |
| 65 | elif self.use_zlib: |
| 66 | data = zlib.decompress(data) |
| 67 | else: |
| 68 | data = gzip_decompress(data) |
| 69 | return self._deserialize(data) |
| 70 | |
| 71 | |
| 72 | def constant_time_compare(s1, s2): |