Files
Aaru.Compression.Native/3rdparty/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp

19 lines
402 B
C++
Raw Normal View History

2021-10-19 21:27:23 +01:00
// OutStreamWithCRC.cpp
#include "StdAfx.h"
#include "OutStreamWithCRC.h"
2023-09-24 03:13:03 +01:00
Z7_COM7F_IMF(COutStreamWithCRC::Write(const void *data, UInt32 size, UInt32 *processedSize))
2021-10-19 21:27:23 +01:00
{
HRESULT result = S_OK;
if (_stream)
result = _stream->Write(data, size, &size);
if (_calculate)
_crc = CrcUpdate(_crc, data, size);
_size += size;
2023-09-24 03:13:03 +01:00
if (processedSize)
2021-10-19 21:27:23 +01:00
*processedSize = size;
return result;
}