basic_filebuf question
Stephan Buys
s.buys@icon.co.za
Tue Jan 29 02:36:00 GMT 2002
Hi all,
I am trying to implement a Binary Patching program. In order to create my
patch files I need to search for patterns in files. I am trying to optimise
the algorithms and need access to the filebuffers' memory.
I use a normal std::ifstream for file input and can then the buffer by
calling MyFile.rdbuf().
I have thought about creating my own basic_filebuf class with Search
implemented and then setting it by using MyFile.rdbuf(&MyBuf). According to
documentation I read (C++ Programming Language) this should make my ifstream
use my new buffer. This version of the std::basic_ios (I think) is not
implemented it seems.
Any idea? I want to direct access to the buffers as I can then use routines
like memcmp (which is optimised) to do pattern matching.
Any pointers or slaps on the head would be greatly appreciated!
Regards,
Stephan Buys
More information about the Libstdc++
mailing list