-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json gzip compression not working on windows #12
Comments
That's very annoying indeed. Do you have any idea what's the reason for this? Is there an upstream bug report somewhere?
In what way does it fail?
That's definitely a good idea. |
As of right now I don't really have a clue. It might have something to do with an outdated zlib version (if I'm not confusing zlib, szip and gzip here..). Long time ago, I already had to add a preprocessor definition in the json(de)serializer.cpp files due to a bug in the boost library, maybe that is somewhat related. I also tried to replace gzip by bzip2 but that resulted in tons of linker errors I wasn't willing to address.
The compressed stream seems to be corrupted, it just can't be read by neither the windows nor linux version. The emitted error is As for extending the serialization tests I don't see a "one-line" solution, since we use the same templated test cases for Xml and Json (de)serialization. Do you have any idea on how to extend the test suite without rewriting it? |
A suggestion was to explicitly flush the stream (i.e. adding As workaround, we add a non-compressed serialization option to VesselGraph{Save,Source} but disable the compression option on windows. |
(De-) serializing using the json backend and enabled gzip compression fails on Windows. This even happens when
gzip::no_compression
is used for the compressing stream.The bug most likely exists since we introduced the feature, because boost was never updated since then.
It was also never detected since the Serializer-Testsuite just does not use compression.
As a workaround, compression will be disabled on windows and a warning will be emitted until the problem is solved.
This, however, destroys portability across plattforms of files e.g. created by VesselGraphSave.
I would suggest to extend the Serializer-Testsuite to also test pretty printing & compression for all possible permutations.
The text was updated successfully, but these errors were encountered: