Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void decode(ArbreHuffman codage, String message) {
- ArbreHuffman a = codage;
- for (int i = 0; i < message.length(); i++) {
- if (message.charAt(i) == '0') {
- if (a.filsG == null) {
- a = codage.filsG;
- } else {
- if(a.character!='0')
- a.affiche();
- a = a.filsG;
- }
- } else {
- if (a.filsD == null) {
- a = codage.filsD;
- } else {
- if(a.character!='0')
- a.affiche();
- a = a.filsD;
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment