]> git.ipfire.org Git - thirdparty/samba.git/commit
ndr_claims: only use compression if it actually reduces the size
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Jan 2025 09:30:53 +0000 (10:30 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 14 Feb 2025 11:56:49 +0000 (11:56 +0000)
commit436d888684fb718c4bb5ae9b33460aef3918c2af
tree6b1347d4deefba684adb303db691e51f26caf38c
parent84b7de6deb453439b42948809f83dc634ee4a8ef
ndr_claims: only use compression if it actually reduces the size

I have captures showing that claims compression depends on the payload
itself and how well it compresses, instead of the pure length of the
payload.

E.g. a single string claim with a value of 68 'a'
characters has an unpressed size of 336
and compressed size is 335.
While a single string with random string s1
has an unpressed size of 504 and it's still
uncompressed on the wire.
A different random string s2 also has an unpressed
size of 504, but it is compressed into a size of 502.

So it really depends if the compression makes it actually
smaller than the uncompressed version.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Feb 14 11:56:49 UTC 2025 on atb-devel-224
librpc/idl/claims.idl
librpc/ndr/ndr_claims.c
librpc/ndr/ndr_claims.h