encoding: In TlvDecoder, move non-looping functions as inline in the header for speed-up.