added comments for some functions

This commit is contained in:
Shikhar Tyagi 2018-01-08 19:16:32 +05:30 committed by GitHub
parent 979be41b21
commit 4d2972658e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,8 @@ import java.util.HashMap;
public class HEncoder { public class HEncoder {
public HashMap<Character, String> encoder = new HashMap<>(); public HashMap<Character, String> encoder = new HashMap<>(); // in order to encode
public HashMap<String, Character> decoder = new HashMap<>(); public HashMap<String, Character> decoder = new HashMap<>(); // in order to decode
private static class Node { private static class Node {
@ -81,6 +81,7 @@ public class HEncoder {
} }
// compression work done here
public String compress(String str) { public String compress(String str) {
String rv = ""; String rv = "";
for (int i = 0; i < str.length(); ++i) { for (int i = 0; i < str.length(); ++i) {
@ -88,7 +89,9 @@ public class HEncoder {
} }
return rv; return rv;
} }
//in order to decompress
public String decompress(String str) { public String decompress(String str) {
String s = ""; String s = "";
String code = ""; String code = "";