binary IO

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dmitry

    binary IO

    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

    but host ftp.fmi.uni-konstanz.de is unknown.

    Thanks in advance,
    Dmitry

  • Thomas Matthews

    #2
    Re: binary IO

    dmitry wrote:[color=blue]
    > 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
    >[/color]

    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:

    C++ Faq: http://www.parashift.com/c++-faq-lite
    C Faq: http://www.eskimo.com/~scs/c-faq/top.html
    alt.comp.lang.l earn.c-c++ faq:

    Other sites:
    http://www.josuttis.com -- C++ STL Library book

    Comment

    • David Harmon

      #3
      Re: binary IO

      On Thu, 13 May 2004 15:49:37 GMT in comp.lang.c++, Thomas Matthews
      <Thomas_Matthew sSpitsOnSpamBot s@sbcglobal.net > wrote,[color=blue]
      >dmitry wrote:[color=green]
      >> 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.[/color][/color]
      [color=blue]
      >Please expand on your definition of "binary stream".
      >Is this the same as opening a stream in binary mode?[/color]

      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.

      Comment

      • Dietmar Kuehl

        #4
        Re: binary IO

        David Harmon wrote:[color=blue][color=green]
        >>dmitry wrote:[color=darkred]
        >>> 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.[/color][/color][/color]

        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.
        [color=blue]
        > 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.[/color]

        CC'ing was a good idea: I didn't see this thread. I put the code on my
        own site (see above).
        --
        <mailto:dietmar _kuehl@yahoo.co m> <http://www.dietmar-kuehl.de/>
        <http://www.contendix.c om> - Software Development & Consulting

        Comment

        Working...