diff options
| author | Dan Engelbrecht <[email protected]> | 2025-06-23 09:42:24 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-06-23 09:42:24 +0200 |
| commit | a0b2ecc4af7e5a167f43d87a3f660c961625ea51 (patch) | |
| tree | a82e9ffa4ae5fb25b5726390765caaee053edef1 | |
| parent | move nodiscard to proper location (#447) (diff) | |
| download | zen-a0b2ecc4af7e5a167f43d87a3f660c961625ea51.tar.xz zen-a0b2ecc4af7e5a167f43d87a3f660c961625ea51.zip | |
update Oodle libs to 2.9.14 (#446)
* update Oodle libs to 2.9.14
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | thirdparty/Oodle/include/oodle2.h | 105 | ||||
| -rw-r--r-- | thirdparty/Oodle/include/oodle2base.h | 22 | ||||
| -rwxr-xr-x | thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.a | bin | 2554576 -> 9261046 bytes | |||
| -rwxr-xr-x | thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.8 | bin | 1905079 -> 0 bytes | |||
| -rw-r--r-- | thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.9 | bin | 0 -> 688096 bytes | |||
| -rwxr-xr-x | thirdparty/Oodle/lib/Mac_x64/liboo2coremac64.a | bin | 10864632 -> 10679216 bytes | |||
| -rw-r--r-- | thirdparty/Oodle/lib/Win64/oo2core_win64.lib | bin | 8776756 -> 9491760 bytes |
8 files changed, 99 insertions, 29 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6120b96ab..60acabe88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - Improvement: If `zen builds upload` fails to upload metadata for a block with a 404 response (due to race condition from hitting different server) we save and retry metdatad upload at end of upload +- Improvement: Updated Oodle libs to 2.9.14 ## 5.6.13 - Feature: Added `--sentry-environment` to `zen` and `zenserver` diff --git a/thirdparty/Oodle/include/oodle2.h b/thirdparty/Oodle/include/oodle2.h index 31204e932..85315e384 100644 --- a/thirdparty/Oodle/include/oodle2.h +++ b/thirdparty/Oodle/include/oodle2.h @@ -1,7 +1,7 @@ //=================================================== // Oodle2 Core header -// (C) Copyright 1994-2021 Epic Games Tools LLC +// (C) Copyright 1994-2022 Epic Games Tools LLC //=================================================== #ifndef __OODLE2_H_INCLUDED__ @@ -26,12 +26,12 @@ // the DLL is incompatible when MAJOR is bumped // MINOR is for internal revs and bug fixes that don't affect API compatibility #define OODLE2_VERSION_MAJOR 9 -#define OODLE2_VERSION_MINOR 2 +#define OODLE2_VERSION_MINOR 14 // OodleVersion string is 1 . MAJOR . MINOR // don't make it from macros cuz the doc tool has to parse the string literal -#define OodleVersion "2.9.2" /* +#define OodleVersion "2.9.14" /* */ //----------------------------------------------------- @@ -577,14 +577,14 @@ OODEFFUNC typedef void * (OODLE_CALLBACK t_fp_OodleCore_Plugin_MallocAligned)( O OODEFFUNC typedef void (OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)( void * ptr ); /* Function pointer type for OodleFree - $:return pointer to memory to free + $:ptr pointer to memory to free */ OOFUNC1 void OOFUNC2 OodleCore_Plugins_SetAllocators( t_fp_OodleCore_Plugin_MallocAligned * fp_OodleMallocAligned, t_fp_OodleCore_Plugin_Free * fp_OodleFree); -/* Set the function pointers for allocation needed by Oodle2 Core +/* Set the function pointers for allocations by Oodle. If these are not set, the default implementation on most platforms uses the C stdlib. On Microsoft platforms the default implementation uses HeapAlloc. @@ -629,7 +629,7 @@ OODEFFUNC typedef void (OODLE_CALLBACK t_fp_OodleCore_Plugin_WaitJob)( OO_U64 jo /* Function pointer type for OodleCore_Plugins_SetJobSystem $:job_handle a job handle returned from RunJob. Never 0. - $:user_ptr is passed through from the OodleLZ_CompressOptions. + $:user_ptr is passed through from the OodleLZ_CompressOptions or OodleTex_Encode call. Waits until the job specified by job_handle is done and cleans up any associated resources. Oodle will call WaitJob exactly once for every RunJob call that didn't return 0. @@ -658,7 +658,7 @@ OOFUNC1 void OOFUNC2 OodleCore_Plugins_SetJobSystemAndCount( t_fp_OodleCore_Plugin_RunJob * fp_RunJob, t_fp_OodleCore_Plugin_WaitJob * fp_WaitJob, int target_parallelism); -/* Set the function pointers for async job system needed by Oodle2 Core +/* Set the function pointers for async job system used by Oodle. $:fp_RunJob pointer to RunJob function $:fp_WaitJob pointer to WaitJob function @@ -791,7 +791,7 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_Compress(OodleLZ_Compressor compressor, $:compressor which OodleLZ variant to use in compression $:rawBuf raw data to compress $:rawLen number of bytes in rawBuf to compress - $:compBuf pointer to write compressed data to ; should be at least $OodleLZ_GetCompressedBufferSizeNeeded + $:compBuf pointer to write compressed data to. MUST be at least $OodleLZ_GetCompressedBufferSizeNeeded bytes $:level OodleLZ_CompressionLevel controls how much CPU effort is put into maximizing compression $:pOptions (optional) options; if NULL, $OodleLZ_CompressOptions_GetDefault is used $:dictionaryBase (optional) if not NULL, provides preceding data to prime the dictionary; must be contiguous with rawBuf, the data between the pointers _dictionaryBase_ and _rawBuf_ is used as the preconditioning data. The exact same precondition must be passed to encoder and decoder. @@ -802,13 +802,22 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_Compress(OodleLZ_Compressor compressor, Performs synchronous memory to memory LZ compression. - In tools, you should generally use $OodleXLZ_Compress_AsyncAndWait instead to get parallelism. (in the Oodle2 Ext lib) + In tools and when compressing large inputs in one call, consider using + $OodleXLZ_Compress_AsyncAndWait (in the Oodle2 Ext lib) instead to get parallelism. Alternatively, + chop the data into small fixed size chunks (we recommend at least 256KiB, i.e. 262144 bytes) and + call compress on each of them, which decreases compression ratio but makes for trivial parallel + compression and decompression. You can compress a large buffer in several calls by setting _dictionaryBase_ to the start of the buffer, and then making _rawBuf_ and _rawLen_ select portions of that buffer. As long - as _rawLen_ is a multiple of $OODLELZ_BLOCK_LEN , the compressed chunks can simply be + as _rawLen_ is a multiple of $OODLELZ_BLOCK_LEN, the compressed chunks can simply be concatenated together. + The buffer that _compBuf_ points to must have a certain minimum size that is returned by + $OodleLZ_GetCompressedBufferSizeNeeded. This size is always more than _rawLen_, usually by a few bytes + for every 256kb of input data. The "compressed" data can end up slightly larger than the input due to + internal stream headers. + If _scratchMem_ is provided, it will be used for the compressor's scratch memory needs before OodleMalloc is called. If the scratch is big enough, no malloc will be done. If the scratch is not big enough, the compress will not fail, instead OodleMalloc will be used. OodleMalloc should not return null. There is currently no way @@ -864,7 +873,7 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_Decompress(const void * compBuf,OO_SINTa compBu need to be the exact number of compressed bytes, is the number of bytes available in the buffer, it must be greater or equal to the actual compressed length. - Note that the new compressors (Kraken,Mermaid,Selkie,BitKnit) are all fuzz safe and you can use OodleLZ_FuzzSafe_Yes + Note that the new compressors (Kraken, Mermaid, Selkie, Leviathan) are all fuzz safe and you can use OodleLZ_FuzzSafe_Yes with them and no padding of the decode target buffer. If checkCRC is OodleLZ_CheckCRC_Yes, then corrupt data will be detected and the decode aborted. @@ -873,8 +882,8 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_Decompress(const void * compBuf,OO_SINTa compBu If corruption is possible, _fuzzSafe_ is No and _checkCRC_ is OodleLZ_CheckCRC_No, $OodleLZ_GetDecodeBufferSize must be used to allocate _rawBuf_ large enough to prevent overrun. - $OodleLZ_GetDecodeBufferSize should always be used to ensure _rawBuf_ is large enough, even when corruption is not - possible (when fuzzSafe is No). + With the legacy LZB16 codec, $OodleLZ_GetDecodeBufferSize should be used to ensure _rawBuf_ is large enough, + even when corruption is not possible (when fuzzSafe is No). _compBuf_ and _rawBuf_ are allowed to overlap for "in place" decoding, but then _rawBuf_ must be allocated to the size given by $OodleLZ_GetInPlaceDecodeBufferSize , and the compressed data must be at the end of that buffer. @@ -889,7 +898,7 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_Decompress(const void * compBuf,OO_SINTa compBu About fuzz safety: OodleLZ_Decompress is guaranteed not to crash even if the data is corrupted when _fuzzSafe_ is set to OodleLZ_FuzzSafe_Yes. - When _fuzzSafe_ is Yes, the target buffer (_rawBuf_ and _rawLen_) will never be overrun. Note that corrupted day might not + When _fuzzSafe_ is Yes, the target buffer (_rawBuf_ and _rawLen_) will never be overrun. Note that corrupted data might not be detected (the return value might indicate success). Fuzz Safe decodes will not crash on corrupt data. They may or may not return failure, and produce garbage output. @@ -926,7 +935,7 @@ OOFUNC1 OodleLZDecoder * OOFUNC2 OodleLZDecoder_Create(OodleLZ_Compressor compre /* Create a OodleLZDecoder $:compressor the type of data you will decode; use $OodleLZ_Compressor_Invalid if unknown - $:rawLen total raw bytes of the decode + $:rawLen total raw bytes of the decode (or <= 0 for any/unknown, but Reset for each buffer) $:memory (optional) provide memory for the OodleLZDecoder object (not the window) $:memorySize (optional) if memory is provided, this is its size in bytes $:return the OodleLZDecoder @@ -940,7 +949,9 @@ OOFUNC1 OodleLZDecoder * OOFUNC2 OodleLZDecoder_Create(OodleLZ_Compressor compre If you pass $OodleLZ_Compressor_Invalid, then any type of data may be decoded, and the Decoder is allocated large enought to handle any of them. - If you are going to pass rawLen to OodleLZDecoder_Reset , then you can pass 0 to rawLen here. + If you are going to pass _rawLen_ to OodleLZDecoder_Reset , then you can pass 0 to _rawLen_ here. To make a Decoder + to use with many buffer sizes, pass either <= 0 (for infinite) or the largest buffer size you can see. Then call + Reset() with the correct buffer size before starting to decode each buffer. See $OodleLZDecoder_DecodeSome for more. */ @@ -1081,8 +1092,6 @@ OOFUNC1 OO_S32 OOFUNC2 OodleLZDecoder_MakeValidCircularWindowSize(OodleLZ_Compre //======================================================= //======================================================= -// remember if you want to IO the SeekEntries you need to make them endian-independent -// see WriteOOZHeader for example #define OODLELZ_SEEKPOINTCOUNT_DEFAULT 16 @@ -1310,7 +1319,6 @@ OO_BOOL OodleLZ_Compressor_RespectsDictionarySize(OodleLZ_Compressor compressor) OOINLINEFUNC OO_BOOL OodleLZ_Compressor_IsNewLZFamily(OodleLZ_Compressor compressor) { const OO_U32 set = - OODLELZ_COMPRESSOR_MASK(OodleLZ_Compressor_None) | OODLELZ_COMPRESSOR_MASK(OodleLZ_Compressor_Kraken) | OODLELZ_COMPRESSOR_MASK(OodleLZ_Compressor_Leviathan) | OODLELZ_COMPRESSOR_MASK(OodleLZ_Compressor_Mermaid) | @@ -1415,6 +1423,27 @@ OODEFEND Installed allocator may be used no matter how much scratch mem you provide. */ +typedef enum OodleLZ_CompressScratchMemBoundType +{ + OodleLZ_CompressScratchMemBoundType_WorstCase = 0, // Worst-case memory use estimate + OodleLZ_CompressScratchMemBoundType_Typical = 1, // Typical memory use estimate; with this much scratch memory, allocations might still happen, but rarely. + + OodleLZ_CompressScratchMemBoundType_Force32 = 0x40000000, +} OodleLZ_CompressScratchMemBoundType; +/* Type of scratch memory bound to compute. + + $OodleLZ_CompressScratchMemBoundType_WorstCase provides a worst-case estimate for the amount + of scratch memory required for compression. If at least this much scratch memory is provided + to the compression functions, they are guaranteed to make no allocations of their own. Some + compression levels don't have simple worst-case memory use guarantees and will return + $OODLELZ_SCRATCH_MEM_NO_BOUND for this type of query. + + $OodleLZ_CompressScratchMemBoundType_Typical returns a scratch memory estimate that will + be sufficient for most compression calls to not require additional memory, even when no + hard guarantees exist. Even so, a good estimate may not be available, in which case + $OODLELZ_SCRATCH_MEM_NO_BOUND is returned. +*/ + OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_GetCompressScratchMemBound( OodleLZ_Compressor compressor, OodleLZ_CompressionLevel level, @@ -1445,6 +1474,42 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_GetCompressScratchMemBound( */ +OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_GetCompressScratchMemBoundEx( + OodleLZ_Compressor compressor, + OodleLZ_CompressionLevel level, + OodleLZ_CompressScratchMemBoundType boundType, + OO_SINTa rawLen, + const OodleLZ_CompressOptions * pOptions OODEFAULT(NULL) + ); +/* Return an estimate for the amount of scratch mem used by OodleLZ_Compress + + $:compressor which OodleLZ variant to use in compression + $:level OodleLZ_CompressionLevel controls how much CPU effort is put into maximizing compression + $:boundType Type of memory estimate to return. + $:rawLen maximum number of bytes you will compress (plus dictionary backup) + $:pOptions (optional) options; if NULL, $OodleLZ_CompressOptions_GetDefault is used + + Returns either a worst-case or typical scratch memory estimate for the given compressor, options + and input size. + + When a worst-case scratch memory estimate exists, passing that much scratch memory to + $OodleLZ_Compress is guaranteed to not do any allocations, provided the parameters match those + of the compression call. + + "Typical" memory bounds are not hard guarantees but will usually not result in any extra allocations. + + For _rawLen_ pass at least the maximum size you will ever encode. If your data is divided into chunks, + pass the chunk size. If you will encode full buffers of unbounded size, pass -1. + + Some options and levels may not have simple finite bounds. Then $OODLELZ_SCRATCH_MEM_NO_BOUND is returned + and the call to $OodleLZ_Compress may use the allocator even if infinite scratch memory is provided. + Currently this applies to all the Optimal levels. + + When OODLELZ_SCRATCH_MEM_NO_BOUND is returned, you can still pass in scratch mem which will be used before + going to the plugin allocator. + +*/ + // get maximum expanded size for compBuf alloc : // (note this is actually larger than the maximum compressed stream, it includes trash padding) OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_GetCompressedBufferSizeNeeded(OodleLZ_Compressor compressor,OO_SINTa rawSize); @@ -1469,7 +1534,7 @@ OOFUNC1 OO_SINTa OOFUNC2 OodleLZ_GetDecodeBufferSize(OodleLZ_Compressor compress $:corruptionPossible true if it is possible for the decoder to get corrupted data $:return size of buffer to malloc; slightly larger than rawSize if padding is needed - As of Oodle 2.9.0 this function is deprecated. For all new codecs you can just use the size of the + As of Oodle 2.9.0 this function is not required. For all new codecs you can just use the size of the uncompressed data for the decode buffer size (_rawSize_), no padding is needed. Note that LZB16 is still supported in 2.9.0 but does require padding when used in a circular diff --git a/thirdparty/Oodle/include/oodle2base.h b/thirdparty/Oodle/include/oodle2base.h index 05f73f3ea..0f5f99025 100644 --- a/thirdparty/Oodle/include/oodle2base.h +++ b/thirdparty/Oodle/include/oodle2base.h @@ -1,7 +1,7 @@ //=================================================== // Oodle2 Base header -// (C) Copyright 1994-2021 Epic Games Tools LLC +// (C) Copyright 1994-2025 Epic Games Tools LLC //=================================================== #ifndef __OODLE2BASE_H_INCLUDED__ @@ -23,7 +23,7 @@ #include <stdint.h> -#define OOCOPYRIGHT "Copyright (C) 1994-2021, Epic Games Tools LLC" +#define OOCOPYRIGHT "Copyright (C) 1994-2025, Epic Games Tools LLC" // Typedefs typedef int8_t OO_S8; @@ -97,13 +97,17 @@ typedef int32_t OO_BOOL; // simple compiler assert // this happens at declaration time, so if it's inside a function in a C file, drop {} around it #ifndef OO_COMPILER_ASSERT - #if defined(__clang__) - #define OO_COMPILER_ASSERT_UNUSED __attribute__((unused)) // hides warnings when compiler_asserts are in a local scope - #else - #define OO_COMPILER_ASSERT_UNUSED - #endif - - #define OO_COMPILER_ASSERT(exp) typedef char OO_NUMBERNAME(_dummy_array) [ (exp) ? 1 : -1 ] OO_COMPILER_ASSERT_UNUSED + #if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) + #define OO_COMPILER_ASSERT(exp) static_assert(exp, "Assert " #exp) + #else + #if defined(__clang__) + #define OO_COMPILER_ASSERT_UNUSED __attribute__((unused)) // hides warnings when compiler_asserts are in a local scope + #else + #define OO_COMPILER_ASSERT_UNUSED + #endif + + #define OO_COMPILER_ASSERT(exp) typedef char OO_NUMBERNAME(_dummy_array) [ (exp) ? 1 : -1 ] OO_COMPILER_ASSERT_UNUSED + #endif #endif diff --git a/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.a b/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.a Binary files differindex bf3c0a296..152fa7bef 100755 --- a/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.a +++ b/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.a diff --git a/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.8 b/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.8 Binary files differdeleted file mode 100755 index 425ada44d..000000000 --- a/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.8 +++ /dev/null diff --git a/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.9 b/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.9 Binary files differnew file mode 100644 index 000000000..d26e64933 --- /dev/null +++ b/thirdparty/Oodle/lib/Linux_x64/liboo2corelinux64.so.9 diff --git a/thirdparty/Oodle/lib/Mac_x64/liboo2coremac64.a b/thirdparty/Oodle/lib/Mac_x64/liboo2coremac64.a Binary files differindex 0bcb1e6b9..284d9bf01 100755 --- a/thirdparty/Oodle/lib/Mac_x64/liboo2coremac64.a +++ b/thirdparty/Oodle/lib/Mac_x64/liboo2coremac64.a diff --git a/thirdparty/Oodle/lib/Win64/oo2core_win64.lib b/thirdparty/Oodle/lib/Win64/oo2core_win64.lib Binary files differindex ae42f727a..0995e623d 100644 --- a/thirdparty/Oodle/lib/Win64/oo2core_win64.lib +++ b/thirdparty/Oodle/lib/Win64/oo2core_win64.lib |