title: Handling large gzfile in c++
body: <pre><code>char buffer[1001];
  for(;!gzeof(m_fHandle);){ 
           gzread(m_fHandle, buffer, 1000);
       The file I'm handling is more than 1GB.
  </code></pre>
  
  <p>do I load the entire file to the buffer? or should I malloc and allocate the size?</p>
  
  <p>Or should I load it line by line? the file has a "\n" demarkating the EOL. if so, how do I do that for handling gzfile in c++?</p>