Note that there are some explanatory texts on larger screens.

plurals
  1. PORun-time error reading a .gz file using boost::iostreams and zlib
    primarykey
    data
    text
    <p>I am trying to read a .gz file and print the text content on screen by using boost::iostreams. This is just a simple experiment to learn about this library, and I am using the "directors.list.gz" file from IMDb (ftp://ftp.fu-berlin.de/pub/misc/movies/database/) as my input file.</p> <p>My code compiles, via MSVC-10, but the process aborts when executed. There's not much information from the error message except for the error code being R6010. </p> <p>Can someone please point me a direction in terms of what may have caused this and how do I make this work? </p> <p>This library looks pretty neat and I do hope to use it correctly. Thanks a lot for helping. </p> <pre><code>#include &lt;fstream&gt; // isalpha #include &lt;iostream&gt; // EOF #include &lt;boost/iostreams/categories.hpp&gt; // input_filter_tag #include &lt;boost/iostreams/operations.hpp&gt; // get #include &lt;boost/iostreams/filtering_stream.hpp&gt; #include &lt;boost/iostreams/copy.hpp&gt; #include &lt;boost/iostreams/device/file_descriptor.hpp&gt; #include &lt;boost/iostreams/device/file.hpp&gt; #include &lt;boost/iostreams/device/array.hpp&gt; #include &lt;boost/iostreams/filter/zlib.hpp&gt; using namespace std; namespace io = boost::iostreams; int main() { if(true) { string infile_path = "c:\\Temp\\directors.list.gz"; ifstream infile(infile_path, ios_base::in | ios_base::binary); io::filtering_streambuf&lt;io::input&gt; in; //filter in.push(io::zlib_decompressor()); in.push(infile); //output to cout io::copy(in, cout); } return 0; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload