On Thu, 13 May 2004 15:49:37 GMT in comp.lang.c++, Thomas Matthews
<Th****************************@sbcglobal.net> wrote,
dmitry wrote: Hi All.
Where can I look for samples of binary stream?
I try ftp://ftp.fmi.uni-konstanz.de/pub/al...l/binio.tar.gz
from gcc documentation
http://gcc.gnu.org/onlinedocs/libstd...eams_kuehl.txt
but host ftp.fmi.uni-konstanz.de is unknown.
Please expand on your definition of "binary stream".
Is this the same as opening a stream in binary mode?
The article by Dietmar Kuhl, cited above, gives the idea. Did you read
it before asking?
Briefly, writing an object out to a binary stream IS a formatting
operation whether you like it or not. Therefore objects should be
written in a chosen representation, e.g. big_endian or little_endian for
ints, user format function for classes, regardless of internal byte
layout. ostream::write() etc. does not do any of this and so is
unsuitable for application programming purposes.
A binary stream would be a different class than existing iostreams,
would probably use the same streambuf classes, but would provide an
entirely different set of operator<< formatting actions and manipulators
for binary formatting.
I hope Dietmar may jump into the thread with a new ftp URL for his code,
so I am CC'ing him on this by email.