Convert to refererces for the strings being encoded to minimize data-passing (which could be sizable depending on the string being de|encoded)