29 static const int8_t 
C2H[] = {
    31   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    32   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    33   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    34    0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1, 
    35   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    36   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    37   -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    38   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    39   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    40   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    41   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    42   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    43   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    44   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    45   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    46   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
    48 static_assert(std::extent<decltype(C2H)>::value == 256, 
"");
    58 HexDecode::convert(
const uint8_t* hex, 
size_t hexLen)
    65   size_t totalDecodedLen = hexLen + (m_hasOddByte ? 1 : 0);
    66   if (totalDecodedLen % 2 == 1) {
    67     m_oddByte = hex[hexLen - 1];
    83 unique_ptr<Transform::OBuffer>
    84 HexDecode::toBytes(
const uint8_t* hex, 
size_t hexLen)
    86   size_t bufferSize = (hexLen + (m_hasOddByte ? 1 : 0)) >> 1;
    87   auto buffer = make_unique<OBuffer>(bufferSize);
    88   auto it = buffer->begin();
    91     if (C2H[hex[0]] < 0 || C2H[m_oddByte] < 0)
    94     *it = (C2H[m_oddByte] << 4) + C2H[hex[0]];
   100   while (hexLen >= 2) {
   101     if (C2H[hex[0]] < 0 || C2H[hex[1]] < 0)
   104     *it = (C2H[hex[0]] << 4) + C2H[hex[1]];
   113 unique_ptr<Transform>
   116   return make_unique<HexDecode>();