let sub v ofs len = if ofs < 0 or len < 0 or ofs + len > v.length then invalid_arg "Bitv.sub"; let r = create len false in unsafe_blit v.bits ofs r.bits 0 len; r