Allow uncompressed files in zip archives

This commit is contained in:
2023-11-19 23:49:11 +01:00
parent 761d8d3d33
commit 681fc00a68
9 changed files with 98 additions and 3 deletions

View File

@@ -41,6 +41,7 @@ namespace OpenVulkano
#else
m_writer = std::make_unique<ArchiveWriter>(m_archives.back().c_str(), m_archiveConfig, m_logger);
#endif
if (m_shouldCompress) m_writer->SetShouldCompressFunction(m_shouldCompress);
}
void MultiPartArchiveWriter::CheckSize(size_t size)
@@ -114,4 +115,10 @@ namespace OpenVulkano
if (!m_writer || !m_writer->GetTotalWrittenBytes()) return; // Nothing has been written yet, no need to split file
m_writer = nullptr;
}
void MultiPartArchiveWriter::SetShouldCompressFunction(const std::function<bool(const FileDescription&)>& shouldComp)
{
if (m_writer) m_writer->SetShouldCompressFunction(shouldComp);
m_shouldCompress = shouldComp;
}
}