Duncan Murdoch <[EMAIL PROTECTED]> wrote: > I would implement it differently from the way you did. I'd call it > a rawConnection, taking a raw variable (or converting something else > using as.raw) as the input, and providing both text and binary > read/write modes (using the same conventions for text mode as a file > connection would). It *should* support seek, at least in binary > mode.
I was trying to reuse as much of the textConnection semantics and underlying code as possible... Having a rawConnection() entry point is simple enough. Seeking also seems straightforward. I'm not so sure about using as.raw(). I wondered about that, but also thought that rather than coercing to raw, it might make more sense to cast atomic vector types to raw, byte-for-byte. Can you given an example of where a text-mode raw connection would be a useful thing? -- Dave ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel