MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / BufferHasIdentifier

Function BufferHasIdentifier

native/thirdpart/flatbuffers/flatbuffers.h:2261–2265  ·  view source on GitHub ↗

Helper to see if the identifier in a buffer has the expected value.

Source from the content-addressed store, hash-verified

2259
2260// Helper to see if the identifier in a buffer has the expected value.
2261inline bool BufferHasIdentifier(const void *buf, const char *identifier,
2262 bool size_prefixed = false) {
2263 return strncmp(GetBufferIdentifier(buf, size_prefixed), identifier,
2264 FlatBufferBuilder::kFileIdentifierLength) == 0;
2265}
2266
2267// Helper class to verify the integrity of a FlatBuffer
2268class Verifier FLATBUFFERS_FINAL_CLASS {

Callers 4

DeserializeMethod · 0.85
CompileMethod · 0.85
VerifyBufferFromStartFunction · 0.85

Calls 1

GetBufferIdentifierFunction · 0.85

Tested by

no test coverage detected