By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,897 Members | 1,955 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,897 IT Pros & Developers. It's quick & easy.

binary IO

P: n/a
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.

Thanks in advance,
Dmitry

Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Thanks in advance,
Dmitry


Please expand on your definition of "binary stream".
Is this the same as opening a stream in binary mode?
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #2

P: n/a
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.

Jul 22 '05 #3

P: n/a
David Harmon wrote:
dmitry wrote:
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.

It is a long time since I put the stuff there and in the meantime the
machine disappeared. I found the implementation, however, brushed it up
a little to compile with up to date compilers and put it at
<http://www.dietmar-kuehl.de/cxxrt/binio.tar.gz>. The code is written
about eight years ago and is not necessarily correct (it had no test
cases such that I can't easily check whether it still does the right
thing). However, I'm using binary formatting with great success in the
project I'm currently paid for. This is somewhat based on the binary
streams although I think only in idea, not implementation.
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.


CC'ing was a good idea: I didn't see this thread. I put the code on my
own site (see above).
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.