gzipstream rewritten to use BufferedReader for faster performance
Merge changes for improved efficiency using BufferedReader