Re: Why copy read stream and zero-copy read streams are not compatible?

2008-10-21 Thread Kenton Varda
You could always have your class implement ZeroCopyInputStream and *contain* an implementation of CopyingInputStream, like: class MyStream : public ZeroCopyInputStream { public: MyStream(); virtual ~MyStream(); CopyingInputStream* AsCopyingInputStream() { return ©ing_stream_

Why copy read stream and zero-copy read streams are not compatible?

2008-10-20 Thread fpmchu
Hi, The ZeroCopyInputStream and CopyingInputStream classes both define a Skip() function, but one returns a bool and the other returns an int. Because of this, they are not compatible, so I can't write a class that implements both interfaces for example. It is sometimes useful to be able to impl