writes a chunk of compressed data, closes it, writes another chunk, and reads the contents back to verify that they are the same.