Olá Alessandro,
A string 's' recebida como argumento deve ser toda a entrada?
Certo.
Da mesma maneira que fizemos em Huffman
, Genome
e RLE
/** * Reads a sequence of 8-bit bytes from standard input; compresses them * using Huffman codes with an 8-bit alphabet; and writes the results * to standard output. */ public static void compress() { // read the input String s = BinaryStdIn.readString(); // <<<<<<<<<<< char[] input = s.toCharArray();
[...] } // close output stream BinaryStdOut.close(); }
o comprimento da string 's' usando como entrada o arquivo dickens.txt é algo em torno de 30 milhões!!!
Legal!
Queremos comprimir arquivos grandes.
% wc dickens.txt
592570 5158644 28965453 dickens.txt
28M parece ok.
decidi que vou enxer o saco de vcs
Perguntas são bem-vindas, não incomodam.
até conseguir fazer
Excelente!