CCSDS 121.0-B-3 Lossless Data Compression (Rice/Golomb coding)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+3 -3
+3 -3
lib/rice.ml
··· 199 199 let half_d = (d asr 1) + (d land 1) in 200 200 let med = (xmax asr 1) + 1 in 201 201 let mask = if data >= med then xmax else 0 in 202 - if half_d <= mask lxor data then begin 203 - if d land 1 = 0 then (data + (d asr 1)) land xmax 202 + if half_d <= mask lxor data then 203 + begin if d land 1 = 0 then (data + (d asr 1)) land xmax 204 204 else (data - ((d + 1) asr 1)) land xmax 205 - end 205 + end 206 206 else mask lxor d land xmax 207 207 208 208 (** Check whether index [i] is the start of an RSI (Reference Sample Interval).