MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / EncodeStringList

Function EncodeStringList

tensorflow/core/platform/tensor_coding.cc:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void EncodeStringList(const tstring* strings, int64 n, string* out) {
37 out->clear();
38 for (int i = 0; i < n; ++i) {
39 core::PutVarint32(out, strings[i].size());
40 }
41 for (int i = 0; i < n; ++i) {
42 out->append(strings[i]);
43 }
44}
45
46bool DecodeStringList(const string& src, tstring* strings, int64 n) {
47 std::vector<uint32> sizes(n);

Callers 1

EncodeMethod · 0.85

Calls 6

PutVarint32Function · 0.85
clearMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45
ClearMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected