Compactifying and Hashing Kernels