code: func (vm *Engine) checkPubKeyEncoding(pubKey []byte) error {
  	if vm.hasFlag(ScriptVerifyWitnessPubKeyType) &&
  		vm.isWitnessVersionActive(0) && !btcec.IsCompressedPubKey(pubKey) {
  
  		str := "only uncompressed keys are accepted post-segwit"
  		return scriptError(ErrWitnessPubKeyType, str)
  	}
  
  	if !vm.hasFlag(ScriptVerifyStrictEncoding) {
  		return nil
  	}
  
  	if len(pubKey) == 33 && (pubKey[0] == 0x02 || pubKey[0] == 0x03) {
  		// Compressed
  		return nil
  	}
  	if len(pubKey) == 65 && pubKey[0] == 0x04 {
  		// Uncompressed
  		return nil
  	}
  
  	return scriptError(ErrPubKeyType, "unsupported public key type")
  }
docs: // checkPubKeyEncoding returns whether or not the passed public key adheres to
  // the strict encoding requirements if enabled.