decode = (str, output = []) => {
    for (let left = 0, right = (left + 8),length = 0;
        left < str.length;
        left = (right + length), right = (left + 8)
    ) {                                                         /* Time O(N) */
        const countString = str.slice(left, right);             /*           | Ignore Auxillary Space O(K) */
        length = parseInt(countString, 2);

        const decoding = str.slice(right, (right + length));    /* Time O(K) | Ignore Auxillary Space O(N * K) */
        output.push(decoding);                                  /*           | Ignore Auxillary Space O(N * K) */
    }

    return output;
}
Chunk Transfer Encoding
Time O(N) | Space O(1)
https://leetcode.com/problems/encode-and-decode-strings/
@param {string} str
@return {string[]}