Lines Matching defs:in
18 * Returns: size in bytes of the encoded integer - at most 9 bytes
42 * @in: varint to decode
45 * Returns: size in bytes of the decoded integer - or -1 on failure (would
48 int bch2_varint_decode(const u8 *in, const u8 *end, u64 *out)
50 unsigned bytes = likely(in < end)
51 ? ffz(*in & 255) + 1
55 if (unlikely(in + bytes > end))
61 memcpy(&v_le, in, bytes);
65 v = get_unaligned_le64(++in);
76 * Returns: size in bytes of the encoded integer - at most 9 bytes
100 * @in: varint to decode
103 * Returns: size in bytes of the decoded integer - or -1 on failure (would
109 int bch2_varint_decode_fast(const u8 *in, const u8 *end, u64 *out)
112 VALGRIND_MAKE_MEM_DEFINED(in, 8);
114 u64 v = get_unaligned_le64(in);
115 unsigned bytes = ffz(*in) + 1;
117 if (unlikely(in + bytes > end))
124 v = get_unaligned_le64(++in);