[*] bonk
This commit is contained in:
parent
99123bb094
commit
11ba608727
@ -14,13 +14,13 @@ namespace Aurora::Compression
|
||||
{
|
||||
AUKN_SYM bool Compress(const AuMemoryViewRead &source, AuByteBuffer &out, int iCompressionLevel /* -7 to 22 */)
|
||||
{
|
||||
if (!out.GetOrAllocateLinearWriteable(source.length))
|
||||
if (!out.GetOrAllocateLinearWriteable(AuMax<AuUInt>(source.length, 20u)))
|
||||
{
|
||||
SysPushErrorMemory();
|
||||
return {};
|
||||
}
|
||||
|
||||
auto uRet = ::ZSTD_compress(out.writePtr, source.length, source.ptr, source.length, iCompressionLevel);
|
||||
|
||||
auto uRet = ::ZSTD_compress(out.writePtr, out.length, source.ptr, source.length, iCompressionLevel);
|
||||
if (::ZSTD_isError(uRet))
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user