1// Compress/CopyCoder.h 2 3#ifndef __COMPRESS_COPY_CODER_H 4#define __COMPRESS_COPY_CODER_H 5 6#include "../../Common/MyCom.h" 7 8#include "../ICoder.h" 9 10namespace NCompress { 11 12class CCopyCoder: 13 public ICompressCoder, 14 public ICompressGetInStreamProcessedSize, 15 public CMyUnknownImp 16{ 17 Byte *_buffer; 18public: 19 UInt64 TotalSize; 20 CCopyCoder(): TotalSize(0), _buffer(0) {}; 21 ~CCopyCoder(); 22 23 MY_UNKNOWN_IMP1(ICompressGetInStreamProcessedSize) 24 25 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, 26 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); 27 STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); 28}; 29 30HRESULT CopyStream(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress); 31 32} 33 34#endif 35