(self, encoding, data)
| 71 | |
| 72 | class MsgDecode(object): |
| 73 | def __init__(self, encoding, data): |
| 74 | self.encoding = encoding |
| 75 | if self.encoding == BITMESSAGE_ENCODING_EXTENDED: |
| 76 | self.decodeExtended(data) |
| 77 | elif self.encoding in [BITMESSAGE_ENCODING_SIMPLE, BITMESSAGE_ENCODING_TRIVIAL]: |
| 78 | self.decodeSimple(data) |
| 79 | else: |
| 80 | self.body = _translate("MsgDecode", "The message has an unknown encoding.\nPerhaps you should upgrade Bitmessage.") |
| 81 | self.subject = _translate("MsgDecode", "Unknown encoding") |
| 82 | |
| 83 | def decodeExtended(self, data): |
| 84 | dc = zlib.decompressobj() |
nothing calls this directly
no test coverage detected