def decode_from_stream(self, in_stream: InputStream, length=0): user_context = decimal.getcontext() decimal.setcontext(self.context) value = decimal.Decimal( in_stream.read_bytes().decode("utf-8")).quantize(self.scale_format) decimal.setcontext(user_context) return value
def decode_from_stream(self, in_stream: InputStream, length=0): return decimal.Decimal(in_stream.read_bytes().decode("utf-8"))
def decode_from_stream(self, in_stream: InputStream, length=0): return in_stream.read_bytes()