public List<String> decode(String s) {
        List<String> result = new ArrayList<>();
        while (s.length() != 0) {
            int size = toSize(s.substring(0, 4));
            result.add(s.substring(4, size + 4));
            s = s.substring(size + 4);
        }
        return result;
    }
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