Lines Matching defs:bytes
42 // A helper utility to decode bytes, integers, fields, varints, etc, from
43 // a buffer of bytes.
57 explicit Decoder(const base::Vector<const byte> bytes,
59 : Decoder(bytes.begin(), bytes.begin() + bytes.length(), buffer_offset) {}
70 // Ensures there are at least {length} bytes left to read, starting at {pc}.
88 uint16_t read_u16(const byte* pc, const char* msg = "expected 2 bytes") {
94 uint32_t read_u32(const byte* pc, const char* msg = "expected 4 bytes") {
100 uint64_t read_u64(const byte* pc, const char* msg = "expected 8 bytes") {
147 // `length` is set to the number of bytes that make up this opcode,
220 // Consume {size} bytes and send them to the bit bucket, advancing {pc_}.
223 TRACE_IF(name, " +%u %-20s: %u bytes\n", pc_offset(), name, size);
231 // Check that at least {size} bytes exist between {pc_} and {end_}.
235 errorf(pc_, "expected %u bytes, fell off end", size);
285 // Debugging helper to print a bytes range as hex bytes.
291 // Debugging helper to print bytes up to the end.
318 void Reset(base::Vector<const uint8_t> bytes, uint32_t buffer_offset = 0) {
319 Reset(bytes.begin(), bytes.end(), buffer_offset);