Skip to main content

COMPRESS_MIN_BODY_SIZE

Static COMPRESS_MIN_BODY_SIZE 

Source
pub(crate) static COMPRESS_MIN_BODY_SIZE: LazyLock<Option<u64>>
Expand description

RPC response compression policy, read from COMPRESS_MIN_BODY_SIZE_VAR.

None means no CompressionLayer is installed at all; Some(bytes) means install a layer that compresses responses whose body is at least bytes.

  • Any value in 0..=u64::MAX sets the minimum response size that will be gzip-encoded; smaller responses are sent as-is. Values above u64::MAX are clamped because SizeAbove is backed by a u64.
  • Any negative integer (e.g. -1) disables compression entirely.
  • Unset defaults to disabled.