extractMinimum = () =>
    less(letters[lettersIndex], buffer[bufferIndex])
      ? letters[lettersIndex++]
      : buffer[bufferIndex++]
Apply Huffman encoding to a string.

@param {string} string
@param {boolean} [compressed=false] - Whether compress the string to bits.
@return {{encoding: Object.<string, string>, value: string|number[]}}