code: private void write(Kim kim, Huff huff, Huff ext) throws JSONException {
          for (int at = 0; at < kim.length; at += 1) {
              int c = kim.get(at);
              write(c, huff);
              while ((c & 128) == 128) {
                  at += 1;
                  c = kim.get(at);
                  write(c, ext);
              }
          }
      }
docs: Write each of the bytes in a kim with Huffman encoding.
  
  @param kim
  A kim containing the bytes to be written.
  @param huff
  The Huffman encoder.
  @param ext
  The Huffman encoder for the extended bytes.
  @throws JSONException