MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / __init__

Method __init__

src/helper_msgcoding.py:73–81  ·  view source on GitHub ↗
(self, encoding, data)

Source from the content-addressed store, hash-verified

71
72class 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()

Callers

nothing calls this directly

Calls 3

decodeExtendedMethod · 0.95
decodeSimpleMethod · 0.95
_translateFunction · 0.90

Tested by

no test coverage detected