Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Compression/lz4.h |
Include |
#include "Compression/lz4.h" |
Source |
/Engine/Source/Runtime/Core/Private/Compression/lz4.cpp |
LZ4int LZ4_compress_default
(
const char * src,
char * dst,
int srcSize,
int dstCapacity
)
LZ4_compress_default() : Compresses 'srcSize' bytes from buffer 'src' into already allocated 'dst' buffer of size 'dstCapacity'. Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize). It also runs faster, so it's a recommended setting. If the function cannot compress 'src' into a more limited 'dst' budget, compression stops immediately, and the function result is zero. In which case, 'dst' content is undefined (invalid). srcSize : max supported value is LZ4_MAX_INPUT_SIZE. dstCapacity : size of buffer 'dst' (which must be already allocated)
: the number of bytes written into buffer 'dst' (necessarily <= dstCapacity) or 0 if compression fails Note : This function is protected against buffer overflow scenarios (never writes outside 'dst' buffer, nor read outside 'source' buffer).