Allow getting the compression used in a connection

@sfackler Done and force-pushed.