Opened 12 years ago
Closed 12 years ago
#4554 closed Bugs (invalid)
[MSVC] gzip_decompressor in filtering_istream returns empty strings | doesn't indicate EOF correctly
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | MSVC, filtering_istream, gzip | Cc: |
Description
The attached is a classical zcat example. It constructs a filtering_istream
out of std::cin
and gzip_decompressor()
, and clones its contents to std::cout
. Being built with GCC on unices, this works flawlessly. Being build with MSVC 10, this fails on the attached files.
With the first file, 1.gz
, the example enters infinite loop, continuously printing empty lines on stdout; getline() returns empty strings.
With the second file, 2.gz
, the example successfully dumps decompressed content, but in the end of the stream enters infinite loop again, this time for the reason of stream_in.eof() always returning false.
Attachments (1)
Change History (2)
by , 12 years ago
comment:1 by , 12 years ago
Component: | None → iostreams |
---|---|
Resolution: | → invalid |
Status: | new → closed |
I'm apologizing for inconvenience. The issue was not a Boost bug, rather an attempt to read a gzipped file in windows text mode. The solution is to use std::ios_base::binary
flag.
classical zcat example