MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / UnstoreFile

Method UnstoreFile

Libraries/unrar/extract.cpp:807–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805
806
807void CmdExtract::UnstoreFile(ComprDataIO &DataIO,int64 DestUnpSize)
808{
809 Array<byte> Buffer(File::CopyBufferSize());
810 while (true)
811 {
812 int ReadSize=DataIO.UnpRead(&Buffer[0],Buffer.Size());
813 if (ReadSize<=0)
814 break;
815 int WriteSize=ReadSize<DestUnpSize ? ReadSize:(int)DestUnpSize;
816 if (WriteSize>0)
817 {
818 DataIO.UnpWrite(&Buffer[0],WriteSize);
819 DestUnpSize-=WriteSize;
820 }
821 }
822}
823
824
825bool CmdExtract::ExtractFileCopy(File &New,wchar *ArcName,wchar *NameNew,wchar *NameExisting,size_t NameExistingSize)

Callers

nothing calls this directly

Calls 3

UnpReadMethod · 0.80
UnpWriteMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected