xref: /third_party/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/lzma/CPP/7zip/Archive/Common/
1370b324cSopenharmony_ci// OutStreamWithCRC.cpp
2370b324cSopenharmony_ci
3370b324cSopenharmony_ci#include "StdAfx.h"
4370b324cSopenharmony_ci
5370b324cSopenharmony_ci#include "OutStreamWithCRC.h"
6370b324cSopenharmony_ci
7370b324cSopenharmony_ciZ7_COM7F_IMF(COutStreamWithCRC::Write(const void *data, UInt32 size, UInt32 *processedSize))
8370b324cSopenharmony_ci{
9370b324cSopenharmony_ci  HRESULT result = S_OK;
10370b324cSopenharmony_ci  if (_stream)
11370b324cSopenharmony_ci    result = _stream->Write(data, size, &size);
12370b324cSopenharmony_ci  if (_calculate)
13370b324cSopenharmony_ci    _crc = CrcUpdate(_crc, data, size);
14370b324cSopenharmony_ci  _size += size;
15370b324cSopenharmony_ci  if (processedSize)
16370b324cSopenharmony_ci    *processedSize = size;
17370b324cSopenharmony_ci  return result;
18370b324cSopenharmony_ci}
19

Indexes created Thu Nov 07 10:32:03 CST 2024