rice: use the standard CCSDS heuristic for selecting [k]
[best_split_k] was doing an O(kmax) exhaustive search for the split
parameter that minimises the encoded length. That's not what Rice
coding normally does.
CCSDS 121.0-B-3 §5.1.3 specifies the split parameter selection
directly: k = floor(log2(block_sum / J)) clamped to [0, kmax]. This
is the Rice/Golomb optimum for the geometric distribution the
residuals follow, so there's no reason to search.
The file already had [select_k] implementing exactly this heuristic,
but it was unreachable — a warning-32 from the build sweep surfaced
it. Wiring it into [best_split_k]:
let best_split_k residuals res_ofs count id_len bps is_ref kmax =
let k = select_k residuals res_ofs count kmax in
let len = id_len + (if is_ref then bps else 0)
+ split_encoded_len residuals res_ofs count k in
(k, len)
Also delete Bitwriter.bit_length — a module-signature entry that was
never called from outside Bitwriter.
All 6 fuzz tests still pass (correlated compresses well, identical
data compresses, random data roundtrips, etc.), confirming the
heuristic matches what the exhaustive scan picked on tested inputs.