smb_compress...ress_chained(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” whether Pattern_V1 was negotiated 🧚
  • src β€” the complete uncompressed SMB2 message πŸ’Œ
  • slen β€” the size of src πŸ“
  • dst β€” the output buffer for the transform πŸŽ€
  • dlen β€” the input capacity of dst and 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 🌈


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