MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / readBytes

Method readBytes

lib/loader/filemgr.cpp:77–84  ·  view source on GitHub ↗

Read bytes. See "include/loader/filemgr.h".

Source from the content-addressed store, hash-verified

75
76// Read bytes. See "include/loader/filemgr.h".
77Expect<std::vector<Byte>> FileMgr::readBytes(size_t SizeToRead) {
78 // Set the flag to the start offset.
79 LastPos = Pos;
80 // Read bytes into vector.
81 std::vector<Byte> Buf(SizeToRead);
82 EXPECTED_TRY(readBytes(Buf));
83 return Buf;
84}
85
86// Decode and read an unsigned int. See "include/loader/filemgr.h".
87Expect<uint32_t> FileMgr::readU32() {

Callers 5

loadSegmentMethod · 0.80
loadModuleAOTMethod · 0.80
component.cppFile · 0.80
TESTFunction · 0.80
NativeLibClass · 0.80

Calls 6

unlikelyFunction · 0.85
UnexpectFunction · 0.85
EXPECTED_TRYFunction · 0.50
likelyFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45

Tested by 1

TESTFunction · 0.64