move decompression code