MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / read

Method read

Source/ThirdParty/streamreader.hh:43–53  ·  view source on GitHub ↗

Read n bytes into destination buffer Returns false on out-of-bounds or error

Source from the content-addressed store, hash-verified

41 // Read n bytes into destination buffer
42 // Returns false on out-of-bounds or error
43 bool read(size_t n, uint8_t* dst) {
44 if (!dst || n == 0) {
45 return false;
46 }
47 if (pos_ + n > length_) {
48 return false; // Out of bounds
49 }
50 std::memcpy(dst, data_ + pos_, n);
51 pos_ += n;
52 return true;
53 }
54
55 // Read 1 byte (uint8_t)
56 bool read1(uint8_t* dst) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected