Conscience Core
lz4.h
Go to the documentation of this file.
1 /*
2  * LZ4 - Fast LZ compression algorithm
3  * Header File
4  * Copyright (c) Yann Collet. All rights reserved.
5 
6  BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are
10  met:
11 
12  * Redistributions of source code must retain the above copyright
13  notice, this list of conditions and the following disclaimer.
14  * Redistributions in binary form must reproduce the above
15  copyright notice, this list of conditions and the following disclaimer
16  in the documentation and/or other materials provided with the
17  distribution.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31  You can contact the author at :
32  - LZ4 homepage : http://www.lz4.org
33  - LZ4 source repository : https://github.com/lz4/lz4
34 */
35 
36 #ifndef LZ4_H_2983827168210
37 #define LZ4_H_2983827168210
38 
39 /* --- Dependency --- */
40 #include <stddef.h> /* size_t */
41 
42 
73 /*^***************************************************************
74 * Export parameters
75 *****************************************************************/
76 /*
77 * LZ4_DLL_EXPORT :
78 * Enable exporting of functions when building a Windows DLL
79 * LZ4LIB_VISIBILITY :
80 * Control library symbols visibility.
81 */
82 #ifndef LZ4LIB_VISIBILITY
83 # if defined(__GNUC__) && (__GNUC__ >= 4)
84 # define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default")))
85 # else
86 # define LZ4LIB_VISIBILITY
87 # endif
88 #endif
89 #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
90 # define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY
91 #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
92 # define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
93 #else
94 # define LZ4LIB_API LZ4LIB_VISIBILITY
95 #endif
96 
109 #if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1)
110 # define LZ4_HEAPMODE 0
111 # define LZ4HC_HEAPMODE 0
112 # define LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION 1
113 # if !defined(LZ4_memcpy)
114 # error "LZ4_FREESTANDING requires macro 'LZ4_memcpy'."
115 # endif
116 # if !defined(LZ4_memset)
117 # error "LZ4_FREESTANDING requires macro 'LZ4_memset'."
118 # endif
119 # if !defined(LZ4_memmove)
120 # error "LZ4_FREESTANDING requires macro 'LZ4_memmove'."
121 # endif
122 #elif ! defined(LZ4_FREESTANDING)
123 # define LZ4_FREESTANDING 0
124 #endif
125 
126 
127 /*------ Version ------*/
128 #define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
129 #define LZ4_VERSION_MINOR 10 /* for new (non-breaking) interface capabilities */
130 #define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
131 
132 #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
133 
134 #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE
135 #define LZ4_QUOTE(str) #str
136 #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str)
137 #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) /* requires v1.7.3+ */
138 
139 LZ4LIB_API int LZ4_versionNumber (void);
140 LZ4LIB_API const char* LZ4_versionString (void);
143 /*-************************************
144 * Tuning memory usage
145 **************************************/
154 #ifndef LZ4_MEMORY_USAGE
155 # define LZ4_MEMORY_USAGE LZ4_MEMORY_USAGE_DEFAULT
156 #endif
157 
158 /* These are absolute limits, they should not be changed by users */
159 #define LZ4_MEMORY_USAGE_MIN 10
160 #define LZ4_MEMORY_USAGE_DEFAULT 14
161 #define LZ4_MEMORY_USAGE_MAX 20
162 
163 #if (LZ4_MEMORY_USAGE < LZ4_MEMORY_USAGE_MIN)
164 # error "LZ4_MEMORY_USAGE is too small !"
165 #endif
166 
167 #if (LZ4_MEMORY_USAGE > LZ4_MEMORY_USAGE_MAX)
168 # error "LZ4_MEMORY_USAGE is too large !"
169 #endif
170 
171 /*-************************************
172 * Simple Functions
173 **************************************/
188 LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity);
189 
205 LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity);
206 
207 
208 /*-************************************
209 * Advanced Functions
210 **************************************/
211 #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */
212 #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
213 
224 
233 LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
234 
235 
242 LZ4LIB_API int LZ4_sizeofState(void);
243 LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
244 
271 LZ4LIB_API int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize);
272 
307 LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity);
308 
309 
310 /*-*********************************************
311 * Streaming Compression Functions
312 ***********************************************/
313 typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */
314 
328 #if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */
329 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
331 LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr);
332 #endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */
333 #endif
334 
358 
370 LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
371 
379 LZ4LIB_API int LZ4_loadDictSlow(LZ4_stream_t* streamPtr, const char* dictionary, int dictSize);
380 
413 LZ4LIB_API void
414 LZ4_attach_dictionary(LZ4_stream_t* workingStream,
415  const LZ4_stream_t* dictionaryStream);
416 
440 LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
441 
449 LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int maxDictSize);
450 
451 
452 /*-**********************************************
453 * Streaming Decompression Functions
454 * Bufferless synchronous API
455 ************************************************/
456 typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* tracking context */
457 
462 #if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */
463 #if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
466 #endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */
467 #endif
468 
476 LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize);
477 
489 LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize);
490 #define LZ4_DECODER_RING_BUFFER_SIZE(maxBlockSize) (65536 + 14 + (maxBlockSize)) /* for static allocation; maxBlockSize presumed valid */
491 
530 LZ4LIB_API int
532  const char* src, char* dst,
533  int srcSize, int dstCapacity);
534 
535 
544 LZ4LIB_API int
545 LZ4_decompress_safe_usingDict(const char* src, char* dst,
546  int srcSize, int dstCapacity,
547  const char* dictStart, int dictSize);
548 
555 LZ4LIB_API int
557  int compressedSize,
558  int targetOutputSize, int maxOutputSize,
559  const char* dictStart, int dictSize);
560 
561 #endif /* LZ4_H_2983827168210 */
562 
563 
564 /*^*************************************
565  * !!!!!! STATIC LINKING ONLY !!!!!!
566  ***************************************/
567 
568 /*-****************************************************************************
569  * Experimental section
570  *
571  * Symbols declared in this section must be considered unstable. Their
572  * signatures or semantics may change, or they may be removed altogether in the
573  * future. They are therefore only safe to depend on when the caller is
574  * statically linked against the library.
575  *
576  * To protect against unsafe usage, not only are the declarations guarded,
577  * the definitions are hidden by default
578  * when building LZ4 as a shared/dynamic library.
579  *
580  * In order to access these declarations,
581  * define LZ4_STATIC_LINKING_ONLY in your application
582  * before including LZ4's headers.
583  *
584  * In order to make their implementations accessible dynamically, you must
585  * define LZ4_PUBLISH_STATIC_FUNCTIONS when building the LZ4 library.
586  ******************************************************************************/
587 
588 #ifdef LZ4_STATIC_LINKING_ONLY
589 
590 #ifndef LZ4_STATIC_3504398509
591 #define LZ4_STATIC_3504398509
592 
593 #ifdef LZ4_PUBLISH_STATIC_FUNCTIONS
594 # define LZ4LIB_STATIC_API LZ4LIB_API
595 #else
596 # define LZ4LIB_STATIC_API
597 #endif
598 
599 
610 LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration);
611 
616 int LZ4_compress_destSize_extState(void* state, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int acceleration);
617 
669 #define LZ4_DECOMPRESS_INPLACE_MARGIN(compressedSize) (((compressedSize) >> 8) + 32)
670 #define LZ4_DECOMPRESS_INPLACE_BUFFER_SIZE(decompressedSize) ((decompressedSize) + LZ4_DECOMPRESS_INPLACE_MARGIN(decompressedSize))
672 #ifndef LZ4_DISTANCE_MAX /* history window size; can be user-defined at compile time */
673 # define LZ4_DISTANCE_MAX 65535 /* set to maximum value by default */
674 #endif
675 
676 #define LZ4_COMPRESS_INPLACE_MARGIN (LZ4_DISTANCE_MAX + 32) /* LZ4_DISTANCE_MAX can be safely replaced by srcSize when it's smaller */
677 #define LZ4_COMPRESS_INPLACE_BUFFER_SIZE(maxCompressedSize) ((maxCompressedSize) + LZ4_COMPRESS_INPLACE_MARGIN)
679 #endif /* LZ4_STATIC_3504398509 */
680 #endif /* LZ4_STATIC_LINKING_ONLY */
681 
682 
683 
684 #ifndef LZ4_H_98237428734687
685 #define LZ4_H_98237428734687
686 
687 /*-************************************************************
688  * Private Definitions
689  **************************************************************
690  * Do not use these definitions directly.
691  * They are only exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`.
692  * Accessing members will expose user code to API and/or ABI break in future versions of the library.
693  **************************************************************/
694 #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2)
695 #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE)
696 #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */
697 
698 #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
699 # include <stdint.h>
700  typedef int8_t LZ4_i8;
701  typedef unsigned char LZ4_byte;
702  typedef uint16_t LZ4_u16;
703  typedef uint32_t LZ4_u32;
704 #else
705  typedef signed char LZ4_i8;
706  typedef unsigned char LZ4_byte;
707  typedef unsigned short LZ4_u16;
708  typedef unsigned int LZ4_u32;
709 #endif
710 
725  /* Implicit padding to ensure structure is aligned */
726 };
727 
728 #define LZ4_STREAM_MINSIZE ((1UL << (LZ4_MEMORY_USAGE)) + 32) /* static size, for inter-version compatibility */
732 }; /* previously typedef'd to LZ4_stream_t */
733 
734 
749 LZ4LIB_API LZ4_stream_t* LZ4_initStream (void* stateBuffer, size_t size);
750 
751 
757 typedef struct {
760  size_t extDictSize;
761  size_t prefixSize;
763 
764 #define LZ4_STREAMDECODE_MINSIZE 32
768 } ; /* previously typedef'd to LZ4_streamDecode_t */
769 
770 
771 
772 /*-************************************
773 * Obsolete Functions
774 **************************************/
775 
787 #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS
788 # define LZ4_DEPRECATED(message) /* disable deprecation warnings */
789 #else
790 # if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */
791 # define LZ4_DEPRECATED(message) [[deprecated(message)]]
792 # elif defined(_MSC_VER)
793 # define LZ4_DEPRECATED(message) __declspec(deprecated(message))
794 # elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 45))
795 # define LZ4_DEPRECATED(message) __attribute__((deprecated(message)))
796 # elif defined(__GNUC__) && (__GNUC__ * 10 + __GNUC_MINOR__ >= 31)
797 # define LZ4_DEPRECATED(message) __attribute__((deprecated))
798 # else
799 # pragma message("WARNING: LZ4_DEPRECATED needs custom implementation for this compiler")
800 # define LZ4_DEPRECATED(message) /* disabled */
801 # endif
802 #endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */
803 
805 LZ4_DEPRECATED("use LZ4_compress_default() instead") LZ4LIB_API int LZ4_compress (const char* src, char* dest, int srcSize);
807 LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize);
808 LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") LZ4LIB_API int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize);
809 LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") LZ4LIB_API int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize);
811 
813 LZ4_DEPRECATED("use LZ4_decompress_fast() instead") LZ4LIB_API int LZ4_uncompress (const char* source, char* dest, int outputSize);
815 
816 /* Obsolete streaming functions (since v1.7.0)
817  * degraded functionality; do not use!
818  *
819  * In order to perform streaming compression, these functions depended on data
820  * that is no longer tracked in the state. They have been preserved as well as
821  * possible: using them will still produce a correct output. However, they don't
822  * actually retain any history between compression calls. The compression ratio
823  * achieved will therefore be no better than compressing each chunk
824  * independently.
825  */
826 LZ4_DEPRECATED("Use LZ4_createStream() instead") LZ4LIB_API void* LZ4_create (char* inputBuffer);
829 LZ4_DEPRECATED("Use LZ4_saveDict() instead") LZ4LIB_API char* LZ4_slideInputBuffer (void* state);
830 
834 
861 LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial() instead")
862 LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize);
863 LZ4_DEPRECATED("This function is deprecated and unsafe. Consider migrating towards LZ4_decompress_safe_continue() instead. "
864  "Note that the contract will change (requires block's compressed size, instead of decompressed size)")
865 LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize);
866 LZ4_DEPRECATED("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_partial_usingDict() instead")
867 LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize);
868 
875 LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr);
876 
877 
878 #endif /* LZ4_H_98237428734687 */
LZ4_compress_fast_extState
LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition: lz4.cpp:1379
srcSize
char int srcSize
Definition: lz4.h:805
LZ4_create
void * LZ4_create(char *inputBuffer)
Definition: lz4.cpp:2813
LZ4_i8
signed char LZ4_i8
Definition: lz4.h:705
LZ4_uncompress_unknownOutputSize
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize)
Definition: lz4.cpp:2796
LZ4_sizeofState
LZ4LIB_API int LZ4_sizeofState(void)
Definition: lz4.cpp:755
LZ4_STREAM_MINSIZE
#define LZ4_STREAM_MINSIZE
Definition: lz4.h:728
inputBuffer
char * inputBuffer
Definition: lz4.h:828
maxOutputSize
char int int maxOutputSize
Definition: lz4.h:806
LZ4_compress_limitedOutput
int LZ4_compress_limitedOutput(const char *source, char *dest, int inputSize, int maxOutputSize)
Definition: lz4.cpp:2761
LZ4_streamDecode_t_internal::extDictSize
size_t extDictSize
Definition: lz4.h:760
LZ4_attach_dictionary
LZ4LIB_API void LZ4_attach_dictionary(LZ4_stream_t *workingStream, const LZ4_stream_t *dictionaryStream)
Definition: lz4.cpp:1655
LZ4_stream_u
Definition: lz4.h:729
LZ4_byte
unsigned char LZ4_byte
Definition: lz4.h:706
dest
char * dest
Definition: lz4.h:805
LZ4_resetStreamState
int LZ4_resetStreamState(void *state, char *inputBuffer)
Definition: lz4.cpp:2805
originalSize
char int originalSize
Definition: lz4.h:833
LZ4_compressBound
LZ4LIB_API int LZ4_compressBound(int inputSize)
Definition: lz4.cpp:754
LZ4_stream_t_internal::dictSize
LZ4_u32 dictSize
Definition: lz4.h:724
LZ4_slideInputBuffer
char * LZ4_slideInputBuffer(void *state)
Definition: lz4.cpp:2820
LZ4_compress_withState
int LZ4_compress_withState(void *state, const char *src, char *dst, int srcSize)
Definition: lz4.cpp:2773
LZ4_streamDecode_t_internal::externalDict
const LZ4_byte * externalDict
Definition: lz4.h:758
LZ4_streamDecode_t_internal::prefixEnd
const LZ4_byte * prefixEnd
Definition: lz4.h:759
LZ4_createStream
LZ4LIB_API LZ4_stream_t * LZ4_createStream(void)
Definition: lz4.cpp:1528
compressedSize
char int compressedSize
Definition: lz4.h:832
LZ4_initStream
LZ4LIB_API LZ4_stream_t * LZ4_initStream(void *stateBuffer, size_t size)
Definition: lz4.cpp:1549
LZ4_compress_limitedOutput_continue
int LZ4_compress_limitedOutput_continue(LZ4_stream_t *LZ4_stream, const char *src, char *dst, int srcSize, int dstCapacity)
Definition: lz4.cpp:2777
LZ4_decompress_fast_usingDict
LZ4LIB_API int LZ4_decompress_fast_usingDict(const char *src, char *dst, int originalSize, const char *dictStart, int dictSize)
Definition: lz4.cpp:2746
LZ4_decompress_safe_partial_usingDict
LZ4LIB_API int LZ4_decompress_safe_partial_usingDict(const char *src, char *dst, int compressedSize, int targetOutputSize, int maxOutputSize, const char *dictStart, int dictSize)
Definition: lz4.cpp:2731
outputSize
char int outputSize
Definition: lz4.h:813
LZ4_stream_t_internal::dictionary
const LZ4_byte * dictionary
Definition: lz4.h:720
LZ4_versionNumber
LZ4LIB_API int LZ4_versionNumber(void)
Definition: lz4.cpp:752
LZ4_freeStreamDecode
LZ4LIB_API int LZ4_freeStreamDecode(LZ4_streamDecode_t *LZ4_stream)
Definition: lz4.cpp:2572
inputSize
const char char int inputSize
Definition: lz4.h:807
LZ4_loadDict
LZ4LIB_API int LZ4_loadDict(LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
Definition: lz4.cpp:1645
LZ4_sizeofStreamState
int LZ4_sizeofStreamState(void)
Definition: lz4.cpp:2803
LZ4_decompress_safe
LZ4LIB_API int LZ4_decompress_safe(const char *src, char *dst, int compressedSize, int dstCapacity)
Definition: lz4.cpp:2448
LZ4_decompress_safe_partial
LZ4LIB_API int LZ4_decompress_safe_partial(const char *src, char *dst, int srcSize, int targetOutputSize, int dstCapacity)
Definition: lz4.cpp:2456
LZ4_stream_t_internal::currentOffset
LZ4_u32 currentOffset
Definition: lz4.h:722
LZ4_DEPRECATED
#define LZ4_DEPRECATED(message)
Definition: lz4.h:800
LZ4_streamDecode_u::internal_donotuse
LZ4_streamDecode_t_internal internal_donotuse
Definition: lz4.h:767
LZ4_loadDictSlow
LZ4LIB_API int LZ4_loadDictSlow(LZ4_stream_t *streamPtr, const char *dictionary, int dictSize)
Definition: lz4.cpp:1650
LZ4_stream_t_internal::hashTable
LZ4_u32 hashTable[LZ4_HASH_SIZE_U32]
Definition: lz4.h:719
LZ4_compress_fast_extState_fastReset
int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition: lz4.cpp:1411
isize
char int isize
Definition: lz4.h:814
LZ4_streamDecode_u
Definition: lz4.h:765
LZ4_streamDecode_t_internal
Definition: lz4.h:757
dst
char * dst
Definition: lz4.h:832
LZ4_freeStream
LZ4LIB_API int LZ4_freeStream(LZ4_stream_t *streamPtr)
Definition: lz4.cpp:1572
source
const char * source
Definition: lz4.h:807
LZ4_u16
unsigned short LZ4_u16
Definition: lz4.h:707
maxDstSize
char int int maxDstSize
Definition: lz4.h:832
LZ4_uncompress
int LZ4_uncompress(const char *source, char *dest, int outputSize)
Definition: lz4.cpp:2792
requires
requires(!IsStringLike< T1 >) void assertEquals(T1 left
LZ4_streamDecode_t_internal::prefixSize
size_t prefixSize
Definition: lz4.h:761
LZ4_STREAMDECODE_MINSIZE
#define LZ4_STREAMDECODE_MINSIZE
Definition: lz4.h:764
LZ4_compress
int LZ4_compress(const char *src, char *dest, int srcSize)
Definition: lz4.cpp:2765
LZ4_decompress_safe_usingDict
LZ4LIB_API int LZ4_decompress_safe_usingDict(const char *src, char *dst, int srcSize, int dstCapacity, const char *dictStart, int dictSize)
Definition: lz4.cpp:2716
LZ4_resetStream
LZ4LIB_API void LZ4_resetStream(LZ4_stream_t *streamPtr)
Definition: lz4.cpp:1561
LZ4_compress_fast
LZ4LIB_API int LZ4_compress_fast(const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition: lz4.cpp:1450
LZ4_decompress_safe_withPrefix64k
LZ4_FORCE_O2 int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest, int compressedSize, int maxOutputSize)
Definition: lz4.cpp:2476
LZ4_compress_limitedOutput_withState
int LZ4_compress_limitedOutput_withState(void *state, const char *src, char *dst, int srcSize, int dstSize)
Definition: lz4.cpp:2769
LZ4_saveDict
LZ4LIB_API int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int maxDictSize)
Definition: lz4.cpp:1811
LZ4_streamDecode_u::minStateSize
char minStateSize[LZ4_STREAMDECODE_MINSIZE]
Definition: lz4.h:766
LZ4_resetStream_fast
LZ4LIB_API void LZ4_resetStream_fast(LZ4_stream_t *streamPtr)
Definition: lz4.cpp:1567
LZ4_decompress_fast_continue
LZ4_FORCE_O2 int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *source, char *dest, int originalSize)
Definition: lz4.cpp:2668
LZ4_createStreamDecode
LZ4LIB_API LZ4_streamDecode_t * LZ4_createStreamDecode(void)
Definition: lz4.cpp:2566
LZ4_decompress_fast
LZ4LIB_API int LZ4_decompress_fast(const char *src, char *dst, int originalSize)
Definition: lz4.cpp:2465
LZ4_decoderRingBufferSize
LZ4LIB_API int LZ4_decoderRingBufferSize(int maxBlockSize)
Definition: lz4.cpp:2612
LZ4_stream_u::internal_donotuse
LZ4_stream_t_internal internal_donotuse
Definition: lz4.h:731
LZ4_decompress_safe_continue
LZ4LIB_API int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, const char *src, char *dst, int srcSize, int dstCapacity)
Definition: lz4.cpp:2628
LZ4_compress_default
LZ4LIB_API int LZ4_compress_default(const char *src, char *dst, int srcSize, int dstCapacity)
Definition: lz4.cpp:1469
LZ4_setStreamDecode
LZ4LIB_API int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode, const char *dictionary, int dictSize)
Definition: lz4.cpp:2586
LZ4_stream_t_internal
Definition: lz4.h:718
s
double s
Definition: HybridAStar.cpp:85
LZ4_stream_u::minStateSize
char minStateSize[LZ4_STREAM_MINSIZE]
Definition: lz4.h:730
src
const char * src
Definition: lz4.h:865
LZ4LIB_API
#define LZ4LIB_API
Definition: lz4.h:94
LZ4_compress_continue
int LZ4_compress_continue(LZ4_stream_t *LZ4_stream, const char *source, char *dest, int inputSize)
Definition: lz4.cpp:2781
LZ4_compress_fast_continue
LZ4LIB_API int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src, char *dst, int srcSize, int dstCapacity, int acceleration)
Definition: lz4.cpp:1704
LZ4_stream_t_internal::dictCtx
const LZ4_stream_t_internal * dictCtx
Definition: lz4.h:721
LZ4_stream_t_internal::tableType
LZ4_u32 tableType
Definition: lz4.h:723
LZ4_HASH_SIZE_U32
#define LZ4_HASH_SIZE_U32
Definition: lz4.h:696
LZ4_compress_destSize
LZ4LIB_API int LZ4_compress_destSize(const char *src, char *dst, int *srcSizePtr, int targetDstSize)
Definition: lz4.cpp:1503
LZ4_decompress_fast_withPrefix64k
int LZ4_decompress_fast_withPrefix64k(const char *source, char *dest, int originalSize)
Definition: lz4.cpp:2493
LZ4_compress_destSize_extState
int LZ4_compress_destSize_extState(void *state, const char *src, char *dst, int *srcSizePtr, int targetDstSize, int acceleration)
Definition: lz4.cpp:1494
LZ4_versionString
const LZ4LIB_API char * LZ4_versionString(void)
Definition: lz4.cpp:753
LZ4_u32
unsigned int LZ4_u32
Definition: lz4.h:708