{"size": 581, "ext": "js", "max_stars_repo_path": "test/huffman-test.js", "max_stars_repo_name": "dingens/Crypto", "max_stars_repo_stars_event_min_datetime": "2015-08-04T08:26:20.000Z", "max_stars_repo_stars_event_max_datetime": "2015-08-04T08:26:20.000Z", "max_issues_repo_path": "test/huffman-test.js", "max_issues_repo_name": "dingens/Crypto", "max_issues_repo_issues_event_min_datetime": "2021-03-02T10:50:33.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-02T10:50:33.000Z", "max_forks_repo_path": "test/huffman-test.js", "max_forks_repo_name": "dingens/Crypto", "max_forks_repo_forks_event_min_datetime": "2015-08-04T08:26:25.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-23T17:11:21.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 29.05, "max_line_length": 176, "alphanum_fraction": 0.6850258176}
var assert = buster.assert;

var mystr;
var code;

buster.testCase("Huffman Test", {
    setUp: function () {
        mystr = "Kenne mer nit, bruche mer nit, fott domet!";
        code = "01010101110111011011111100101100111111010001011100011101001100100100010000010110111111001011001111110100010111000111001100000011011111001110000110010101101011";
        
    },
    "Huffman encode": function () {
        var huf = Huffman.treeFromText(mystr);
        var enc = huf.encode(mystr);
        var encbin = huf.stringToBitString(enc);
        assert.equals(encbin,code);
    }

});
