i think what you observe is due to the fact that memcache itself does not implement compression so each library does it in their own way, just compare the flags used to indicate compression is in use
as defined by pylibmc
#define PYLIBMC_FLAG_ZLIB (1 << 3)
(so this is flag == 8)
and by php-memcached
#define MEMC_VAL_COMPRESSED (1<<4)
#define MEMC_VAL_COMPRESSION_ZLIB (1<<5)
#define MEMC_VAL_COMPRESSION_FASTLZ (1<<6)
so i think unless you are willing to modify one of this libraries to make it's flags consistent with the other then there is no way out
Edit: Ok, so here is the little patch that bring compression support for pylibmc and php-memcached in sync. See my github fork of pylibmc.
Big fat warring - it works only on strings, so if you want to store objects you MUST do de/serialization on your own (JSON).