support lossy codec and lossless decompression in same library