Beispiel #1
0
 void InFile::Read(BYTE *pbyBuffer, UINT32 nBytesToRead) const
 {
     UINT32 unBytesProcessed = 0;
     while (unBytesProcessed < nBytesToRead)
     {
         auto unBytesRead = ReadPart(pbyBuffer, nBytesToRead);
         if (!unBytesRead)
         {
             return;
         }
         pbyBuffer += unBytesRead;
         unBytesProcessed += unBytesRead;
     }
 }
Beispiel #2
0
bool CFile::Read(void *data, UInt32 size, UInt32 &processedSize)
{
	processedSize = 0;

	do {
		UInt32 processedLoc = 0;
		bool res = ReadPart(data, size, processedLoc);
		processedSize += processedLoc;
		if (!res)
			return false;
		if (processedLoc == 0)
			return true;
		data = (void*)((unsigned char*)data + processedLoc);
		size -= processedLoc;
	} while (size > 0);
}
Beispiel #3
0
HRESULT CLZMA::Read(void *data, UINT32 size, UINT32 *processedSize)
{
  return ReadPart(data, size, processedSize);
}
Beispiel #4
0
void CNetCacheAPI::ReadData(const string& key, string& buffer)
{
    ReadPart(key, 0, 0, buffer);
}