LZ4_saveDict

LZ4_saveDict() : If last 64KB data cannot be guaranteed to remain available at its current memory location, save it into a safer place (char* safeBuffer).

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Compression/lz4.h

Include

#include "Compression/lz4.h"

Source

/Engine/Source/Runtime/Core/Private/Compression/lz4.cpp

Syntax

LZ4int LZ4_saveDict
(
    LZ4_stream_t * streamPtr,
    char * safeBuffer,
    int maxDictSize
)

Remarks

LZ4_saveDict() : If last 64KB data cannot be guaranteed to remain available at its current memory location, save it into a safer place (char* safeBuffer). This is schematically equivalent to a memcpy() followed by LZ4_loadDict(), but is much faster, because LZ4_saveDict() doesn't need to rebuild tables. LZ4_saveDict() : If previously compressed data block is not guaranteed to remain available at its memory location, save it into a safer place (char* safeBuffer). Note : you don't need to call LZ4_loadDict() afterwards, dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error.

LZ4_saveDict() : If previously compressed data block is not guaranteed to remain available at its memory location, save it into a safer place (char* safeBuffer).

: you don't need to call LZ4_loadDict() afterwards, dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error.

Returns

: saved dictionary size in bytes (necessarily <= maxDictSize), or 0 if error.