catch exception during compression decode/encode.