public void compress(int array[]) {
        char symbol;
        StringBuilder str = new StringBuilder();
        for (int item : array) {
            item += 150;
            symbol = (char) item;
            str.append(item);
            if (mydata_str == null) {
                mydata_str = Character.toString(symbol);
            } else
                mydata_str += Character.toString(symbol);
            add_to_list(Character.toString(symbol));
        }

        sort_my_data(mylist);
        evaluate_code();
        write_To_file();
        code_data_content();
        double resultBefore = getBits(str.toString());
        double resultAfter = mydata_coded.length();
        System.out.println("Huffman's compression:");
        System.out.printf("Length of initial string = %.0f bits", resultBefore);
        System.out.printf("\nLength of compressed string = %.0f bits", resultAfter);
        System.out.println("\nKoeff of compression = " + Math.round((resultAfter / resultBefore) * 100) + "%");
        write_Compressed();
    }