michael@0: // OffsetStream.h michael@0: michael@0: #ifndef __OFFSETSTREAM_H michael@0: #define __OFFSETSTREAM_H michael@0: michael@0: #include "Common/MyCom.h" michael@0: #include "../IStream.h" michael@0: michael@0: class COffsetOutStream: michael@0: public IOutStream, michael@0: public CMyUnknownImp michael@0: { michael@0: UInt64 _offset; michael@0: CMyComPtr _stream; michael@0: public: michael@0: HRESULT Init(IOutStream *stream, UInt64 offset); michael@0: michael@0: MY_UNKNOWN_IMP michael@0: michael@0: STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); michael@0: STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); michael@0: STDMETHOD(SetSize)(Int64 newSize); michael@0: }; michael@0: michael@0: #endif