Added validity check prior to decompression