LZ4_resetStream_fast

[LZ4_resetStream_fast()](API\Runtime\Core\Compression\LZ4_resetStream_fast) : v1.9.0+ Use this to prepare an LZ4_stream_t for a new chain of dependent blocks (e.g., [LZ4_compress_fast_continue()](API\Runtime\Core\Compression\LZ4_compress_fast_continue)).

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

LZ4void LZ4_resetStream_fast
(
    LZ4_stream_t * streamPtr
)

Remarks

LZ4_resetStream_fast() : v1.9.0+ Use this to prepare an LZ4_stream_t for a new chain of dependent blocks (e.g., LZ4_compress_fast_continue()).

An LZ4_stream_t must be initialized once before usage. This is automatically done when created by LZ4_createStream(). However, should the LZ4_stream_t be simply declared on stack (for example), it's necessary to initialize it first, using LZ4_initStream().

After init, start any new stream with LZ4_resetStream_fast(). A same LZ4_stream_t can be re-used multiple times consecutively and compress multiple streams, provided that it starts each new stream with LZ4_resetStream_fast().

LZ4_resetStream_fast() is much faster than LZ4_initStream(), but is not compatible with memory regions containing garbage data.

it's only useful to call LZ4_resetStream_fast() in the context of streaming compression. The extState functions perform their own resets. Invoking LZ4_resetStream_fast() before is redundant, and even counterproductive.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss