private int toSize(String str) {
        int val = 0;
        for (int i = str.length() - 1; i > 0; i--) {
            val += str.charAt(i);
            val = val << 8;
        }
        val += str.charAt(0);
        return val;
    }
Date 04/06/2016
@author Tushar Roy

Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network
and is decoded back to the original list of strings.

Reference
https://leetcode.com/problems/encode-and-decode-strings/
src/com/interview/string/StringEncoderDecoder.java