smb_compress...ress_chained(9)
π NAME π
okay bestie, welcome to the smb_compress...ress_chained(9) page from the Kernel API Manual β and the main character here is smb_compression_compress_chained, which builds a chained SMB2 transform. periodt. π
β¨
π¦ SYNOPSIS π¦
int smb_compression_compress_chained (__le16 alg , bool allow_pattern , const void *src , u32 slen , void *dst , u32 *dlen );
πΈ ARGUMENTS πΈ
algβ the negotiated general-purpose compression algorithm πallow_patternβ whetherPattern_V1was negotiated π§srcβ the complete uncompressed SMB2 message πslenβ the size ofsrcπdstβ the output buffer for the transform πdlenβ the input capacity ofdstand the output transform size π₯
β¨ DESCRIPTION β¨
So here's the vibe: following the algorithm in [MS-SMB2] 3.1.4.4, this helper encodes sufficiently long repeated runs at the front and back as Pattern_V1 payloads. π«Ά
It compresses a middle region larger than 1 KiB with LZ77; smaller middle regions are represented by a chained NONE payload. no cap, that's the whole shape of it. π
important bestie note: this helper does not decide whether the final transform is smaller than the original message. The transport caller owns that policy decision, fr fr. π
β RETURN β
It returns 0 on success, otherwise a negative errno. slay. π
π SEE ALSO π
- Kernel file
./fs/smb/common/compress/compress.cπ smb_compression_decompress(9)π
okay that's the whole page, bestie β source/version ./fs/smb/common/compress, dated October 2026, page smb_compress...ress_chained(9). iconic π
π
π¦ 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