Is it a good idea to use std::streamoff type instead. There are many places where position in stream been casted to UInt64T or even UIntT.