We need to decode long streams of data flowing.
Each piece of data is a long string comprising encoded sequences,separated by delimiters. Each sequence is a made up of encoded keys.
The mapping between the encoded 'keys' and their character equivalents is maintained separately. The idea is look up each key in the map;and replace with the corresponding alphabet.
What is the most efficient way of achieving this.
Is a substring and replace the right way to approach handling streams as this? Or do we have a higher-performing alternative?
StringBuilderor achar[]for performance. The map should be fine, maps are really high performance forget.