Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/IO > API/Runtime/Core/IO/IIoStoreWriterReferenceChunkData-
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/IO/IoDispatcher.h |
| Include | #include "IO/IoDispatcher.h" |
bool RetrieveChunk
&40;
const TPair< FIoContainerId, FIoChunkHash > & InChunkKey,
TUniqueFunction< void(TIoStatusOr< FIoStoreCompressedReadResult >)> InCompletionCallback
&41;
Remarks
Used by IIoStoreWriter to check and see if there's a reference chunk that matches the data that IoStoreWriter wants to compress and write. Validity checks must be synchronous - if a chunk can't be used for some reason (no matching chunk exists or otherwise), this function must return false and not call InCompletionCallback.
Once a matching chunk is found, it is read from the source iostore container asynchronously, and upon completion InCompletionCallback is called with the raw output from FIoStoreReader::ReadCompressed (i.e. FIoStoreCompressedReadResult). Failures once the async read process has started are currently fatal due to difficulties in rekicking a read.
For the moment, changes in compression method are allowed.
RetrieveChunk is not currently thread safe and must be called from a single thread.
Chunks provided MUST decompress to bits that hash to the exact value provided in InChunkKey (i.e. be exactly the same bits), and also be the same number of blocks (i.e. same CompressionBlockSize)