MCPcopy Create free account
hub / github.com/VCVRack/Rack / archiveReadVectorCallback

Function archiveReadVectorCallback

src/system.cpp:503–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501};
502
503static la_ssize_t archiveReadVectorCallback(struct archive *a, void* client_data, const void** buffer) {
504 assert(client_data);
505 ArchiveReadVectorData* arvd = (ArchiveReadVectorData*) client_data;
506 assert(arvd->data);
507 const std::vector<uint8_t>& data = *arvd->data;
508 *buffer = &data[arvd->pos];
509 // Read up to some block size of bytes
510 size_t len = std::min(data.size() - arvd->pos, size_t(1 << 16));
511 arvd->pos += len;
512 return len;
513}
514
515static void unarchiveToDirectory(const std::string& archivePath, const std::vector<uint8_t>* archiveData, const std::string& dirPathStr) {
516#if defined ARCH_MAC

Callers

nothing calls this directly

Calls 2

minFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected