Converts Gt element @x into an array of bytes. If @compress is True, 
    the point will be compressed resulting in a much shorter string of bytes.

def serializeGt(x, compress=True):
    """
    Converts Gt element @x into an array of bytes. If @compress is True, 
    the point will be compressed resulting in a much shorter string of bytes.
    """
    assertType(x, GtElement)
    return _serialize(x, compress, librelic.gt_size_bin_abi,
        librelic.gt_write_bin_abi)