Refactor Fourier compression and decompression.