def _deserialize(x, elementType, compress, relicReadBinFunc):
<EOL>b = (c_ubyte*len(x))(*bytearray(x))<EOL>flag = c_int(compress)<EOL>result = elementType()<EOL>relicReadBinFunc(byref(result), byref(b), len(x), flag)<EOL>return result<EOL>
Deserializes a bytearray @x, into an @element of the correct type,
using the a relic read_bin function and the specified @compressed flag.
This is the underlying implementation for deserialize G1, G2, and Gt.