misc/libphysfs/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp
author Wuzzy <Wuzzy2@mail.ru>
Wed, 28 Mar 2018 15:21:23 +0200
changeset 13297 e9caada3aac1
parent 12218 bb5522e88ab2
permissions -rw-r--r--
CMake for server: Pass -dynamic flag to ghc

// 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);
}