generic decompression function in the kernel