mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 08:11:35 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
27
CPP/7zip/Archive/Lzh/LzhOutStreamWithCRC.cpp
Executable file
27
CPP/7zip/Archive/Lzh/LzhOutStreamWithCRC.cpp
Executable file
@@ -0,0 +1,27 @@
|
||||
// LzhOutStreamWithCRC.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "LzhOutStreamWithCRC.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NLzh {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}}
|
||||
Reference in New Issue
Block a user