LZ4_decompress_safe_partial(9)
πΈ NAME πΈ
okay bestie, this is the LZ4_decompress_safe_partial(9) page from the Kernel API Manual π and the whole mood is: decompress a block of size compressedSize at position source into buffer dest, but like, carefully and with boundaries. β¨
β¨ SYNOPSIS β¨
int LZ4_decompress_safe_partial (const char *source , char *dest , int
compressedSize , int targetOutputSize , int maxDecompressedSize );
π ARGUMENTS π
sourceβ the source address of the compressed data. literally where the compressed stuff lives. πdestβ the output buffer address for the decompressed data, and it must already be allocated, bestie. π«ΆcompressedSizeβ the precise full size of the compressed block. not approximate, not vibe-based: precise. π―targetOutputSizeβ the decompression operation will try to stop as soon astargetOutputSizehas been reached. like βokay weβre done hereβ energy. βmaxDecompressedSizeβ the size of the destination buffer. this is the boundary, respect it. π§
π¦ DESCRIPTION π¦
so this function decompresses a compressed block of size compressedSize at position source into destination buffer dest of size maxDecompressedSize. it tries to stop the decompression operation as soon as targetOutputSize has been reached. π
and the safety part? iconic. this function never writes outside of the output buffer, and never reads outside of the input buffer. that means it is therefore protected against malicious data packets. no cap, thatβs the whole protective vibe. π‘οΈβ¨
π RETURN π
it returns the number of bytes decoded in the destination buffer (necessarily <= maxDecompressedSize) or a negative result in case of error. so itβs a byte count when it slays, and a negative result when something went wrong. π
π₯ SEE ALSO π₯
kernel file: ./include/linux/lz4.h β and the whole friend group is here:
LZ4_compressBound(9)LZ4_compress_default(9)LZ4_compress_fast(9)LZ4_compress_destSize(9)LZ4_decompress_fast(9)LZ4_decompress_safe(9)LZ4_compress_HC(9)LZ4_resetStreamHC(9)LZ4_loadDictHC(9)LZ4_compress_HC_continue(9)LZ4_saveDictHC(9)LZ4_resetStream(9)LZ4_loadDict(9)LZ4_saveDict(9)LZ4_compress_fast_continue(9)LZ4_setStreamDecode(9)LZ4_decompress_safe_continue(9)LZ4_decompress_fast_continue(9)LZ4_decompress_safe_usingDict(9)LZ4_decompress_fast_usingDict(9)
okay thatβs the page, bestie β this one is from ./include/linux, October 2026, and itβs the LZ4_decompress_safe_partial(9) manual. mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms