From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../src/7zip/Archive/Common/OutStreamWithCRC.cpp | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 other-licenses/7zstub/src/7zip/Archive/Common/OutStreamWithCRC.cpp (limited to 'other-licenses/7zstub/src/7zip/Archive/Common/OutStreamWithCRC.cpp') diff --git a/other-licenses/7zstub/src/7zip/Archive/Common/OutStreamWithCRC.cpp b/other-licenses/7zstub/src/7zip/Archive/Common/OutStreamWithCRC.cpp new file mode 100644 index 000000000..6199562ee --- /dev/null +++ b/other-licenses/7zstub/src/7zip/Archive/Common/OutStreamWithCRC.cpp @@ -0,0 +1,23 @@ +// OutStreamWithCRC.cpp + +#include "StdAfx.h" + +#include "OutStreamWithCRC.h" + +STDMETHODIMP COutStreamWithCRC::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); + _crc.Update(data, realProcessedSize); + if(processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} -- cgit v1.2.3