docs: public byte[] serialize(CharTrie charTrie) {
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      try {
        try (BitOutputStream out = new BitOutputStream(buffer)) {
          int level = 0;
          while (serialize(charTrie.root(), out, level++) > 0) {
          }
        }
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      return buffer.toByteArray();
    }