Compression and new way of opening/reopening stream