misc/libphysfs/lzma/CPP/7zip/Common/StreamUtils.cpp
changeset 13904 99b265e0d1d0
parent 13903 5f819b90d479
child 13905 b172a5d40eee
--- a/misc/libphysfs/lzma/CPP/7zip/Common/StreamUtils.cpp	Thu Oct 11 23:43:31 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-// StreamUtils.cpp
-
-#include "StdAfx.h"
-
-#include "../../Common/MyCom.h"
-#include "StreamUtils.h"
-
-HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize)
-{
-  if (processedSize != 0)
-    *processedSize = 0;
-  while(size != 0)
-  {
-    UInt32 processedSizeLoc; 
-    HRESULT res = stream->Read(data, size, &processedSizeLoc);
-    if (processedSize != 0)
-      *processedSize += processedSizeLoc;
-    data = (Byte *)((Byte *)data + processedSizeLoc);
-    size -= processedSizeLoc;
-    RINOK(res);
-    if (processedSizeLoc == 0)
-      return S_OK;
-  }
-  return S_OK;
-}
-
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize)
-{
-  if (processedSize != 0)
-    *processedSize = 0;
-  while(size != 0)
-  {
-    UInt32 processedSizeLoc; 
-    HRESULT res = stream->Write(data, size, &processedSizeLoc);
-    if (processedSize != 0)
-      *processedSize += processedSizeLoc;
-    data = (const void *)((const Byte *)data + processedSizeLoc);
-    size -= processedSizeLoc;
-    RINOK(res);
-    if (processedSizeLoc == 0)
-      return E_FAIL;
-  }
-  return S_OK;
-}