VR-Vantage 3.0.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Namespaces | Macros | Typedefs | Functions | Variables
tracy_lz4.hpp File Reference

Go to the source code of this file.

Classes

struct  tracy::LZ4_stream_t_internal
struct  tracy::LZ4_streamDecode_t_internal
union  tracy::LZ4_stream_u
union  tracy::LZ4_streamDecode_u

Namespaces

namespace  tracy

Macros

#define LZ4LIB_VISIBILITY
 Introduction.
#define LZ4LIB_API   LZ4LIB_VISIBILITY
#define LZ4_VERSION_MAJOR   1 /* for breaking interface changes */
#define LZ4_VERSION_MINOR   9 /* for new (non-breaking) interface capabilities */
#define LZ4_VERSION_RELEASE   3 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER   (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
#define LZ4_LIB_VERSION   LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE
#define LZ4_QUOTE(str)   #str
#define LZ4_EXPAND_AND_QUOTE(str)   LZ4_QUOTE(str)
#define LZ4_VERSION_STRING   LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION)
#define LZ4_MEMORY_USAGE   14
#define LZ4_MAX_INPUT_SIZE   0x7E000000 /* 2 113 929 216 bytes */
#define LZ4_COMPRESSBOUND(isize)   ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
#define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize)   (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */
#define TRACY_LZ4_H_98237428734687
#define LZ4_HASHLOG   (LZ4_MEMORY_USAGE-2)
#define LZ4_HASHTABLESIZE   (1 << LZ4_MEMORY_USAGE)
#define LZ4_HASH_SIZE_U32   (1 << LZ4_HASHLOG) /* required as macro for static allocation */
#define LZ4_STREAMSIZE   16416 /* static size, for inter-version compatibility */
#define LZ4_STREAMSIZE_VOIDP   (LZ4_STREAMSIZE / sizeof(void*))
#define LZ4_STREAMDECODESIZE_U64   (4 + ((sizeof(void*)==16) ? 2 : 0) /*AS-400*/ )
#define LZ4_STREAMDECODESIZE   (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
#define LZ4_DEPRECATED(message)   /* disabled */

Typedefs

typedef union LZ4_stream_u tracy::LZ4_stream_t
typedef union LZ4_streamDecode_u tracy::LZ4_streamDecode_t
typedef signed char tracy::LZ4_i8
typedef unsigned char tracy::LZ4_byte
typedef unsigned short tracy::LZ4_u16
typedef unsigned int tracy::LZ4_u32
typedef struct
LZ4_stream_t_internal 
tracy::LZ4_stream_t_internal

Functions

LZ4LIB_API int tracy::LZ4_versionNumber (void)
 library version number; useful to check dll version
LZ4LIB_API const char * tracy::LZ4_versionString (void)
 library version string; useful to check dll version
LZ4LIB_API int tracy::LZ4_compress_default (const char *src, char *dst, int srcSize, int dstCapacity)
LZ4LIB_API int tracy::LZ4_decompress_safe (const char *src, char *dst, int compressedSize, int dstCapacity)
LZ4LIB_API int tracy::LZ4_compressBound (int inputSize)
LZ4LIB_API int tracy::LZ4_compress_fast (const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int tracy::LZ4_sizeofState (void)
LZ4LIB_API int tracy::LZ4_compress_fast_extState (void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int tracy::LZ4_compress_destSize (const char *src, char *dst, int *srcSizePtr, int targetDstSize)
LZ4LIB_API int tracy::LZ4_decompress_safe_partial (const char *src, char *dst, int srcSize, int targetOutputSize, int dstCapacity)
LZ4LIB_API LZ4_stream_ttracy::LZ4_createStream (void)
LZ4LIB_API int tracy::LZ4_freeStream (LZ4_stream_t *streamPtr)
LZ4LIB_API void tracy::LZ4_resetStream_fast (LZ4_stream_t *streamPtr)
LZ4LIB_API int tracy::LZ4_loadDict (LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
LZ4LIB_API int tracy::LZ4_compress_fast_continue (LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
LZ4LIB_API int tracy::LZ4_saveDict (LZ4_stream_t *streamPtr, char *safeBuffer, int maxDictSize)
LZ4LIB_API LZ4_streamDecode_ttracy::LZ4_createStreamDecode (void)
LZ4LIB_API int tracy::LZ4_freeStreamDecode (LZ4_streamDecode_t *LZ4_stream)
LZ4LIB_API int tracy::LZ4_setStreamDecode (LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
LZ4LIB_API int tracy::LZ4_decoderRingBufferSize (int maxBlockSize)
LZ4LIB_API int tracy::LZ4_decompress_safe_continue (LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int srcSize, int dstCapacity)
LZ4LIB_API int tracy::LZ4_decompress_safe_usingDict (const char *src, char *dst, int srcSize, int dstCapcity, const char *dictStart, int dictSize)
LZ4LIB_API LZ4_stream_ttracy::LZ4_initStream (void *buffer, size_t size)
 tracy::LZ4_DEPRECATED ("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress(const char *src
 tracy::LZ4_DEPRECATED ("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_withState(void *state
 tracy::LZ4_DEPRECATED ("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_continue(LZ4_stream_t *LZ4_streamPtr
 tracy::LZ4_DEPRECATED ("use LZ4_decompress_fast() instead") LZ4LIB_API int LZ4_uncompress(const char *source
 tracy::LZ4_DEPRECATED ("use LZ4_decompress_safe() instead") LZ4LIB_API int LZ4_uncompress_unknownOutputSize(const char *source
 tracy::LZ4_DEPRECATED ("Use LZ4_createStream() instead") LZ4LIB_API void *LZ4_create(char *inputBuffer)
 tracy::LZ4_DEPRECATED ("Use LZ4_resetStream() instead") LZ4LIB_API int LZ4_resetStreamState(void *state
 tracy::LZ4_DEPRECATED ("Use LZ4_saveDict() instead") LZ4LIB_API char *LZ4_slideInputBuffer(void *state)
 tracy::LZ4_DEPRECATED ("use LZ4_decompress_safe_usingDict() instead") LZ4LIB_API int LZ4_decompress_safe_withPrefix64k(const char *src
 tracy::LZ4_DEPRECATED ("use LZ4_decompress_fast_usingDict() instead") LZ4LIB_API int LZ4_decompress_fast_withPrefix64k(const char *src
LZ4LIB_API int tracy::LZ4_decompress_fast (const char *src, char *dst, int originalSize)
LZ4LIB_API int tracy::LZ4_decompress_fast_continue (LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int originalSize)
LZ4LIB_API int tracy::LZ4_decompress_fast_usingDict (const char *src, char *dst, int originalSize, const char *dictStart, int dictSize)
LZ4LIB_API void tracy::LZ4_resetStream (LZ4_stream_t *streamPtr)

Variables

char * tracy::dest
char int tracy::srcSize
char int int tracy::maxOutputSize
const char * tracy::source
const char char int tracy::inputSize
char int tracy::outputSize
char int tracy::isize
char * tracy::inputBuffer
char * tracy::dst
char int tracy::compressedSize
char int int tracy::maxDstSize
char int tracy::originalSize

Macro Definition Documentation

#define LZ4LIB_VISIBILITY

Introduction.

LZ4 is lossless compression algorithm, providing compression speed >500 MB/s per core, scalable with multi-cores CPU. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

The LZ4 compression library provides in-memory compression and decompression functions. It gives full buffer control to user. Compression can be done in:

  • a single step (described as Simple Functions)
  • a single step, reusing a context (described in Advanced Functions)
  • unbounded multiple steps (described as Streaming compression)

lz4.h generates and decodes LZ4-compressed blocks (doc/lz4_Block_format.md). Decompressing such a compressed block requires additional metadata. Exact metadata depends on exact decompression function. For the typical case of LZ4_decompress_safe(), metadata includes block's compressed size, and maximum bound of decompressed size. Each application is free to encode and pass such metadata in whichever way it wants.

lz4.h only handle blocks, it can not generate Frames.

Blocks are different from Frames (doc/lz4_Frame_format.md). Frames bundle both blocks and metadata in a specified manner. Embedding metadata is required for compressed data to be self-contained and portable. Frame format is delivered through a companion API, declared in lz4frame.h. The lz4 CLI can only manage frames.

#define LZ4LIB_API   LZ4LIB_VISIBILITY
#define LZ4_VERSION_MAJOR   1 /* for breaking interface changes */
#define LZ4_VERSION_MINOR   9 /* for new (non-breaking) interface capabilities */
#define LZ4_VERSION_RELEASE   3 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER   (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
#define LZ4_QUOTE (   str)    #str
#define LZ4_EXPAND_AND_QUOTE (   str)    LZ4_QUOTE(str)
#define LZ4_VERSION_STRING   LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION)
#define LZ4_MEMORY_USAGE   14

LZ4_MEMORY_USAGE : Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) Increasing memory usage improves compression ratio. Reduced memory usage may improve speed, thanks to better cache locality. Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache

#define LZ4_MAX_INPUT_SIZE   0x7E000000 /* 2 113 929 216 bytes */
#define LZ4_COMPRESSBOUND (   isize)    ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
#define LZ4_DECODER_RING_BUFFER_SIZE (   maxBlockSize)    (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */
#define TRACY_LZ4_H_98237428734687
#define LZ4_HASHLOG   (LZ4_MEMORY_USAGE-2)
#define LZ4_HASHTABLESIZE   (1 << LZ4_MEMORY_USAGE)
#define LZ4_HASH_SIZE_U32   (1 << LZ4_HASHLOG) /* required as macro for static allocation */
#define LZ4_STREAMSIZE   16416 /* static size, for inter-version compatibility */

LZ4_stream_t : Do not use below internal definitions directly ! Declare or allocate an LZ4_stream_t instead. LZ4_stream_t can also be created using LZ4_createStream(), which is recommended. The structure definition can be convenient for static allocation (on stack, or as part of larger structure). Init this structure with LZ4_initStream() before first use. note : only use this definition in association with static linking ! this definition is not API/ABI safe, and may change in future versions.

#define LZ4_STREAMSIZE_VOIDP   (LZ4_STREAMSIZE / sizeof(void*))
#define LZ4_STREAMDECODESIZE_U64   (4 + ((sizeof(void*)==16) ? 2 : 0) /*AS-400*/ )

LZ4_streamDecode_t : information structure to track an LZ4 stream during decompression. init this structure using LZ4_setStreamDecode() before first use. note : only use in association with static linking ! this definition is not API/ABI safe, and may change in a future version !

#define LZ4_STREAMDECODESIZE   (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long))
#define LZ4_DEPRECATED (   message)    /* disabled */

Deprecation warnings

Deprecated functions make the compiler generate a warning when invoked. This is meant to invite users to update their source code. Should deprecation warnings be a problem, it is generally possible to disable them, typically with -Wno-deprecated-declarations for gcc or _CRT_SECURE_NO_WARNINGS in Visual.

Another method is to define LZ4_DISABLE_DEPRECATE_WARNINGS before including the header file.



Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)