update GzipOutputStream, replace do-while with while loop.