pub fn g1_from_bytes(bytes: &[u8; G1_SIZE]) -> Result<G1Projective, GroupDecodingError> {
    let g1a = G1Affine::from_compressed(bytes);

    if bool::from(g1a.is_some()) {
        Ok(G1Projective::from(g1a.unwrap()))
    } else {
        Err(GroupDecodingError::InvalidPoint)
    }
}
/// Decode BLS12-381 G1 point from bytes
///
/// # Arguments
/// * `bytes`: a compressed instance of G1 point
/// # Errors
/// * `GroupDecodingError` if the input is invalid
/// # Returns
/// The decoded point
Decode BLS12-381 G1 point from bytes
Decode BLS12 - 381 G1 point from bytes
pub fn g1_from_bytes(bytes: &[u8; G1_SIZE]) -> Result<G1Projective, GroupDecodingError> {
    let g1a = G1Affine::from_compressed(bytes);
    if bool::from(g1a.is_some()) {
        Ok(G1Projective::from(g1a.unwrap()))
    } else {
        Err(GroupDecodingError::InvalidPoint)
    }
}
pub fn g1_from_bytes ( bytes : & [ u8 ; G1_SIZE ] ) -> Result < G1Projective , GroupDecodingError > { let g1a = G1Affine :: from_compressed ( bytes ) ; if bool :: from ( g1a . is_some ( ) ) { Ok ( G1Projective :: from ( g1a . unwrap ( ) ) ) } else { Err ( GroupDecodingError :: InvalidPoint ) } }
Decode BLS12-381 G1 point from bytes
Decode BLS12 - 381 G1 point from bytes
bytes
&[u8; G1_SIZE]
The decoded point
The decoded point
bytes
&[u8; G1_SIZE]
errors
`GroupDecodingError` if the input is invalid
` GroupDecodingError ` if the input is invalid