pub fn leopard_aligned_shard_len(data_len: usize, data_shards: usize) -> usizeExpand description
Computes a per-shard length, in bytes, that Leopard will accept for a payload
of data_len bytes spread across data_shards data shards.
The result is always a non-zero multiple of LEOPARD_SHARD_MULTIPLE, so
it is guaranteed to pass [validate_leopard_shard_len], for every input:
data_len == 0(or any payload smaller than one block) clamps up toLEOPARD_SHARD_MULTIPLE.data_shards == 0is treated as a single shard (no divide-by-zero).- Payloads near
usize::MAXsaturate to the largest multiple ofLEOPARD_SHARD_MULTIPLEthat fits in ausize, rather than overflowing.