The library has secp256k1_ec_pubkey_decompress() But symmetric operation _compress() does not exist.
It is possible to export PrivKey to compressed PubKey form, but sometime PrivKey is not available.
As I see the implementation is very simple: copy first 33 bytes and OR some bitmask.