
Jens,
to 1: Make your functions take a std::ostream& reference, that way you are not bound to the streamtype.
to 2: A streambuf is not a stream, its a buffer for a stream, please consult the documentation for usage :)
Many thanks -- I see that now. However, there is a mysterious piece of this puzzle that still eludes me: Since the filtering_streambuf (myCompressedFileStream) needs the ofstream file (myFileStream) defined FIRST, in order to push it, how do I then construct a valid ostream that I can stream to and will be compressed INTO the file I specified in the ofstream. If I just output to myFileStream, it doesn't go through the filtering_streambuf and UNCOMPRESSED text ends up in the file.
to 3: if you do not specify a concrete path, afaik the file should be created in the directory where the file is run from.
I found the location where the file was being created:
<user>/Library/Preferences/