update revision of lz4 package used by o3de (#3911)

* Update windows & android builtin lz4 package version

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Update linux builtin packages to use the new lz4 vcpkg

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Update Mac & iOS builtins to use the new lz4 vcpkg

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Update MultiplayerCompression Gem LZ4Compressor to use the replacement for deprecated LZ4compressHC function

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
This commit is contained in:
rgba16f [Amazon]
2021-09-03 12:19:45 -05:00
committed by GitHub
parent 2ca03367bb
commit 64a561a948
6 changed files with 12 additions and 7 deletions
@@ -56,11 +56,16 @@ namespace MultiplayerCompression
AZ_Warning("Multiplayer Compressor", compDataSize >= compWorstCaseSize, "Outbuffer size (%lu B) passed to Compress() is less than estimated worst case (%lu B)", compDataSize, compWorstCaseSize);
// Note that this returns a non-negative int so we are narrowing into a size_t here
compSize = LZ4_compressHC(reinterpret_cast<const char*>(uncompData), reinterpret_cast<char*>(compData), static_cast<int>(uncompSize));
compSize = LZ4_compress_HC(
reinterpret_cast<const char*>(uncompData),
reinterpret_cast<char*>(compData),
static_cast<int>(uncompSize),
static_cast<int>(compDataSize),
0);
if (compSize == 0)
{
// LZ4_compressHC returns a zero value for corrupt data and insufficient buffer
// LZ4_compress_HC returns a zero value for corrupt data and insufficient buffer
AZ_Warning("Multiplayer Compressor", false, "Compression failed for uncompSize:(%lu B) compDataSize:(%lu B) compSize:(%lu B)", uncompSize, compDataSize, compSize);
return AzNetworking::CompressorError::CorruptData;
}