MCPcopy Create free account
hub / github.com/apache/brpc / FindCompressHandler

Function FindCompressHandler

src/brpc/compress.cpp:51–61  ·  view source on GitHub ↗

Find CompressHandler by type. Returns NULL if not found

Source from the content-addressed store, hash-verified

49// Find CompressHandler by type.
50// Returns NULL if not found
51const CompressHandler* FindCompressHandler(CompressType type) {
52 int index = type;
53 if (index < 0 || index >= MAX_HANDLER_SIZE) {
54 LOG(ERROR) << "CompressType=" << type << " is out of range";
55 return NULL;
56 }
57 if (NULL == s_handler_map[index].Compress) {
58 return NULL;
59 }
60 return &s_handler_map[index];
61}
62
63const char* CompressTypeToCStr(CompressType type) {
64 if (type == COMPRESS_TYPE_NONE) {

Callers 5

CompressTypeToCStrFunction · 0.85
ParseFromCompressedDataFunction · 0.85
SerializeRpcMessageFunction · 0.85
DeserializeRpcMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected