MCPcopy Create free account
hub / github.com/apache/trafficserver / unpack

Function unpack

src/proxy/http2/test_HPACK.cc:66–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64int last = 0;
65
66int
67unpack(string &packed, uint8_t *unpacked)
68{
69 int n = packed.length() / 2;
70 for (int i = 0; i < n; ++i) {
71 int u = packed[i * 2];
72 int l = packed[i * 2 + 1];
73 unpacked[i] = (((u >= 'a') ? u - 'a' + 10 : u - '0') << 4) + ((l >= 'a') ? l - 'a' + 10 : l - '0');
74 }
75 return n;
76}
77
78void
79pack(uint8_t *unpacked, int unpacked_len, string &packed)

Callers 2

test_decodingFunction · 0.85
unpackMethod · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected