MCPcopy Create free account
hub / github.com/bytedance/bolt / readLengthPrefixedString

Function readLengthPrefixedString

bolt/serializers/PrestoSerializer.cpp:1087–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085}
1086
1087std::string readLengthPrefixedString(ByteInputStream* source) {
1088 int32_t size = source->read<int32_t>();
1089 std::string value;
1090 value.resize(size);
1091 source->readBytes(&value[0], size);
1092 return value;
1093}
1094
1095void checkTypeEncoding(std::string_view encoding, const TypePtr& type) {
1096 const auto kindEncoding = typeToEncodingName(type);

Callers 1

readColumnsFunction · 0.85

Calls 2

resizeMethod · 0.45
readBytesMethod · 0.45

Tested by

no test coverage detected