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

Function pack

src/proxy/http2/test_HPACK.cc:78–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void
79pack(uint8_t *unpacked, int unpacked_len, string &packed)
80{
81 packed = "";
82 for (int i = 0; i < unpacked_len; ++i) {
83 packed += (unpacked[i] >> 4) >= 0x0A ? (unpacked[i] >> 4) - 0x0A + 'a' : (unpacked[i] >> 4) + '0';
84 packed += (unpacked[i] & 0x0F) >= 0x0A ? (unpacked[i] & 0x0F) - 0x0A + 'a' : (unpacked[i] & 0x0F) + '0';
85 }
86}
87
88string
89unescape(string &str)

Callers 2

test_encodingFunction · 0.85
packMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected