From d0928a7f2071b9f06a32780d79c0c5a0b204c360 Mon Sep 17 00:00:00 2001 From: Takayuki Matsuoka Date: Thu, 11 Aug 2022 01:09:53 +0900 Subject: Add short document of LZ4_FREESTANDING to lz4.h --- lib/lz4.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/lz4.h b/lib/lz4.h index 01ab445..9d93eb1 100644 --- a/lib/lz4.h +++ b/lib/lz4.h @@ -97,10 +97,17 @@ extern "C" { # define LZ4LIB_API LZ4LIB_VISIBILITY #endif -/*! - * LZ4_FREESTANDING : - * Enable "freestanding mode" that is suitable for typical freestanding environment. - * In freestanding mode, some LZ4/HC functions which use heap are disabled. +/*! LZ4_FREESTANDING : + * When this macro is set to 1, it enables "freestanding mode" that is + * suitable for typical freestanding environment which doesn't support + * standard C library. + * + * - LZ4_FREESTANDING is a compile-time switch. + * - It requires the following macros to be defined: + * LZ4_memcpy, LZ4_memmove, LZ4_memset. + * - It only enables LZ4/HC functions which don't use heap. + * All LZ4F_* functions are not supported. + * - See tests/freestanding.c to check its basic setup. */ #if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1) # define LZ4_HEAPMODE 0 -- cgit v0.12