|
Boost Users : |
Subject: [Boost-users] IoStreams: Weird bzip2 behavior?
From: Dr. Roland Bock (rbock_at_[hidden])
Date: 2008-09-15 01:50:53
Hi,
when experimenting with IoStreams a bit, I tried bzip2 compression, too.
In contrast to zlib and gzip compression, it did not work as expected.
I have a bit weird behavior in two aspects.
a) Unknown error code:
======================
The attached code yields:
Caught bzip2 error with code: -2
data_error: -4
data_error_magic: -5
config_error: -9
So for some reason, I am catching a bzip2_error with an error code which
is not even documented.
When I replace gzip2 by zlib, it works fine.
b) Empty output of compression:
===============================
When I use a std::ofstream instead of the decompressingStream, I get an
empty file. This might be the reason for a), but then I would have
expected data_error or data_error_magic?
Decompressing the content of a valid bzip2 compressed file works fine.
Any ideas what might be going wrong?
Thanks in advance,
Roland
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net