summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/7zip/Archive/7z/7zSpecStream.cpp
blob: 06969636da2904e74bca8fe8e32a48c5c47975ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 7zSpecStream.cpp

#include "StdAfx.h"

#include "7zSpecStream.h"

STDMETHODIMP CSequentialInStreamSizeCount2::Read(void *data, UInt32 size, UInt32 *processedSize)
{
  UInt32 realProcessedSize;
  HRESULT result = _stream->Read(data, size, &realProcessedSize);
  _size += realProcessedSize;
  if (processedSize != 0)
    *processedSize = realProcessedSize;
  return result;
}

STDMETHODIMP CSequentialInStreamSizeCount2::GetSubStreamSize(
    UInt64 subStream, UInt64 *value)
{
  if (_getSubStreamSize == NULL)
    return E_NOTIMPL;
  return  _getSubStreamSize->GetSubStreamSize(subStream, value);
}