Lines Matching refs:value
20 // Encodes an unsigned value using variable-length encoding and stores it using
26 std::is_same<decltype(std::declval<Function>()(0)), byte*>::value,
28 VLQEncodeUnsigned(Function&& process_byte, uint32_t value) {
29 byte* written_byte = process_byte(value);
30 if (value <= kDataMask) {
37 value >>= kContinueShift;
38 written_byte = process_byte(value);
39 } while (value > kDataMask);
42 // Encodes value using variable-length encoding and stores it using the passed
46 std::is_same<decltype(std::declval<Function>()(0)), byte*>::value,
48 VLQEncode(Function&& process_byte, int32_t value) {
50 DCHECK_NE(value, std::numeric_limits<int32_t>::min());
51 bool is_negative = value < 0;
53 uint32_t bits = static_cast<uint32_t>((is_negative ? -value : value) << 1) |
60 inline void VLQEncode(std::vector<byte, A>* data, int32_t value) {
62 [data](byte value) {
63 data->push_back(value);
66 value);
71 inline void VLQEncodeUnsigned(std::vector<byte, A>* data, uint32_t value) {
73 [data](byte value) {
74 data->push_back(value);
77 value);
80 // Decodes a variable-length encoded unsigned value from bytes returned by
84 std::is_same<decltype(std::declval<GetNextFunction>()()), byte>::value,
101 // Decodes a variable-length encoded unsigned value stored in contiguous memory
103 // value starts.
108 // Decodes a variable-length encoded value stored in contiguous memory starting
109 // at data_start + index, updating index to where the next encoded value starts.