diff options
| author | Dan Engelbrecht <[email protected]> | 2025-11-27 16:05:56 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-11-27 16:05:56 +0100 |
| commit | 4984e8cd5c38cf77c8cb978f75f808bce0577f2d (patch) | |
| tree | c298828c6290a669500788f96f8ea25be41ff88a /src/zencore/include | |
| parent | remove bad assert (#670) (diff) | |
| download | zen-4984e8cd5c38cf77c8cb978f75f808bce0577f2d.tar.xz zen-4984e8cd5c38cf77c8cb978f75f808bce0577f2d.zip | |
automatic scrub on startup (#667)
- Improvement: Deeper validation of data when scrub is activated (cas/cache/project)
- Improvement: Enabled more multi threading when running scrub operations
- Improvement: Added means to force a scrub operation at startup with a new release using ZEN_DATA_FORCE_SCRUB_VERSION variable in xmake.lua
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/compress.h | 20 | ||||
| -rw-r--r-- | src/zencore/include/zencore/config.h.in | 1 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/zencore/include/zencore/compress.h b/src/zencore/include/zencore/compress.h index 09fa6249d..3802a8c31 100644 --- a/src/zencore/include/zencore/compress.h +++ b/src/zencore/include/zencore/compress.h @@ -100,12 +100,20 @@ public: uint64_t& OutRawSize); [[nodiscard]] ZENCORE_API static CompressedBuffer FromCompressedNoValidate(IoBuffer&& CompressedData); [[nodiscard]] ZENCORE_API static CompressedBuffer FromCompressedNoValidate(CompositeBuffer&& CompressedData); - [[nodiscard]] ZENCORE_API static bool ValidateCompressedHeader(IoBuffer&& CompressedData, IoHash& OutRawHash, uint64_t& OutRawSize); - [[nodiscard]] ZENCORE_API static bool ValidateCompressedHeader(const IoBuffer& CompressedData, - IoHash& OutRawHash, - uint64_t& OutRawSize); - [[nodiscard]] ZENCORE_API static size_t GetHeaderSizeForNoneEncoder(); - [[nodiscard]] ZENCORE_API static UniqueBuffer CreateHeaderForNoneEncoder(uint64_t RawSize, const BLAKE3& RawHash); + [[nodiscard]] ZENCORE_API static bool ValidateCompressedHeader(IoBuffer&& CompressedData, + IoHash& OutRawHash, + uint64_t& OutRawSize, + uint64_t* OutOptionalTotalCompressedSize); + [[nodiscard]] ZENCORE_API static bool ValidateCompressedHeader(const IoBuffer& CompressedData, + IoHash& OutRawHash, + uint64_t& OutRawSize, + uint64_t* OutOptionalTotalCompressedSize); + [[nodiscard]] ZENCORE_API static bool ValidateCompressedHeader(const CompositeBuffer& CompressedData, + IoHash& OutRawHash, + uint64_t& OutRawSize, + uint64_t* OutOptionalTotalCompressedSize); + [[nodiscard]] ZENCORE_API static size_t GetHeaderSizeForNoneEncoder(); + [[nodiscard]] ZENCORE_API static UniqueBuffer CreateHeaderForNoneEncoder(uint64_t RawSize, const BLAKE3& RawHash); /** Reset this to null. */ inline void Reset() { CompressedData.Reset(); } diff --git a/src/zencore/include/zencore/config.h.in b/src/zencore/include/zencore/config.h.in index 3372eca2a..93256756d 100644 --- a/src/zencore/include/zencore/config.h.in +++ b/src/zencore/include/zencore/config.h.in @@ -14,3 +14,4 @@ #define ZEN_CFG_VERSION_BUILD_STRING "${VERSION}-${plat}-${arch}-${mode}" #define ZEN_CFG_VERSION_BUILD_STRING_FULL "${VERSION}-${VERSION_BUILD}-${plat}-${arch}-${mode}-${GIT_COMMIT}" #define ZEN_CFG_SCHEMA_VERSION ${ZEN_SCHEMA_VERSION} +#define ZEN_CFG_DATA_FORCE_SCRUB_VERSION ${ZEN_DATA_FORCE_SCRUB_VERSION} |