boost.zlib on Windows
Dear Boost Users, I would like to ask You what is the status of Boost.zlib on Windows. I have a program that uses Boost.iostreams to create a gzip file. It compiles both on Windows and Linux and on Linux it creates a functional gz file. On Windows it creates a gz file but when I try to decompress the file it gives me "data error". When I look at Boost's regression tests both gzip and zlib is missing on Windows. Has anybody successfully run Boost.zlib on Windows recently? Is there some flush method that should be called, but on Linux it does not show any symptoms? Thank You in advance, UJ
I would like to ask You what is the status of Boost.zlib on Windows. I have a program that uses Boost.iostreams to create a gzip file. It compiles both on Windows and Linux and on Linux it creates a functional gz file. On Windows it creates a gz file but when I try to decompress the file it gives me "data error".
Quick guess: How do you open a file? Do you open it as binary? If not you will get unexpected results under Windows :-) Artyom
Hello, I'm using both gzip & bzip2 support under Windows with Cygwin. I have compiled the libraries myself and setup the environment variables and compile in the next step the IOStream Boost library (see the IOStream documentation). Everything works fine with bzip2 and gzip support. Phil Am 18.03.2012 15:05, schrieb László Marák:
Dear Boost Users,
I would like to ask You what is the status of Boost.zlib on Windows. I have a program that uses Boost.iostreams to create a gzip file. It compiles both on Windows and Linux and on Linux it creates a functional gz file. On Windows it creates a gz file but when I try to decompress the file it gives me "data error".
When I look at Boost's regression tests both gzip and zlib is missing on Windows. Has anybody successfully run Boost.zlib on Windows recently? Is there some flush method that should be called, but on Linux it does not show any symptoms?
Thank You in advance,
UJ _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 18/03/2012 14:05, László Marák wrote:
When I look at Boost's regression tests both gzip and zlib is missing on Windows. Has anybody successfully run Boost.zlib on Windows recently? Is there some flush method that should be called, but on Linux it does not show any symptoms?
KTC-Win7x64_VC10x64 at http://www.boost.org/development/tests/release/developer/iostreams.html. It's over a month old, but sufficient to shows that it is working. KTC
On Sunday, March 18, 2012 10:05 AM, László Marák wrote:
I would like to ask You what is the status of Boost.zlib on Windows. I have a program that uses Boost.iostreams to create a gzip file. It compiles both on Windows and Linux and on Linux it creates a functional gz file. On Windows it creates a gz file but when I try to decompress the file it gives me "data error".
When I look at Boost's regression tests both gzip and zlib is missing on Windows. Has anybody successfully run Boost.zlib on Windows recently? Is there some flush method that should be called, but on Linux it does not show any symptoms?
I agree with Artyom Beilis. It sounds like you're opening the files in text mode. This causes Windows to insert a carriage return (0x0D) before each line feed (0x0A), but has no effect on Linux or other Unix-like operating systems.
Here is the actual code I use to open a gz or bz2 file for writing in one of my projects, which produced valid gz files with boost 1.48 (untested with 1.49) and Visual Studio 2010, both in i386 and AMD64 modes. Ignore the references to tbb::scalable_allocator. In particular, note the last line where I specify the file_sink should be binary:
boost::iostreams::filtering_stream
participants (5)
-
Andrew Holden
-
Artyom Beilis
-
KTC
-
László Marák
-
Philipp Kraus