X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=lzma%2FCPP%2F7zip%2FArchive%2FCommon%2FDummyOutStream.cpp;fp=lzma%2FCPP%2F7zip%2FArchive%2FCommon%2FDummyOutStream.cpp;h=54bcfec1108d9003e148b51682cf654ec110881a;hb=1a2e54b98aaab3669eebd38facb83687c4ac7baf;hp=0000000000000000000000000000000000000000;hpb=0b9bdac28929054558b5d7f315403fe3399a1413;p=physicsfs diff --git a/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp b/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp new file mode 100644 index 0000000..54bcfec --- /dev/null +++ b/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp @@ -0,0 +1,22 @@ +// DummyOutStream.cpp + +#include "StdAfx.h" + +#include "DummyOutStream.h" + +STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result; + if(!_stream) + { + realProcessedSize = size; + result = S_OK; + } + else + result = _stream->Write(data, size, &realProcessedSize); + _size += realProcessedSize; + if(processedSize != NULL) + *processedSize = realProcessedSize; + return result; +}