add key compression to Key class