@Override
    public int shrinkId(final long id64) {
        final int lon32 = (int) (id64 >> 32);
        //noinspection PointlessBitwiseExpression
        final int lat32 = (int) (id64 & 0xffffffff);
        final int dlon = lon32 - lonBase;
        final int dlat = lat32 - latBase;
        int id32 = 0;

        for (int bm = 0x4000; bm > 0; bm >>= 1) {
            id32 <<= 2;
            if ((dlon & bm) != 0) {
                id32 |= 1;
            }
            if ((dlat & bm) != 0) {
                id32 |= 2;
            }
        }
        return id32;
    }
MicroCache2 is the new format that uses statistical encoding and
is able to do access filtering and waypoint matching during encoding
main/src/main/java/cgeo/geocaching/brouter/codec/MicroCache2.java