def put64

bend-kit-bytes@0.3.3.0 · bytes.bend:277

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base
import bend-kit-int@0.2.0.0/int.bend as Int

277def put64(b: Bytes, +i: U32, +be: Bool, +v: Int.U64) -> Bytes:
278  Bytes{+len, buf} = b
279  +hi = Int.U64.to_u32(Int.U64.shr(v, 32n))
280  +lo = Int.U64.to_u32(v)
281  put64.if(fits(len, i, 8), len, buf, i, be, Bool.pick(U32, be, hi, lo), Bool.pick(U32, be, lo, hi))

Uses (9)

Used by (2)