Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,17 @@
let to_vlq n =
let a, b = n >>> 7, n &&& 0x7F
let rec aux n acc =
let x,xs = (n &&& 0x7F) ||| 0x80, n >>> 7
if xs > 0 then aux xs (x::acc) else x::acc
aux a [b]
let to_num = List.fold (fun n x -> (n <<< 7) + (x &&& 0x7F)) 0
let v_rep n =
let seq = to_vlq n
printf "%d ->" n
List.iter (printf " 0x%02X") seq
printfn " -> %d" (to_num seq)
v_rep 0x200000
v_rep 0x1FFFFF