From 4d2972658eaaaabd982fd5a0e66e3bdd3e6a0ab3 Mon Sep 17 00:00:00 2001 From: Shikhar Tyagi Date: Mon, 8 Jan 2018 19:16:32 +0530 Subject: [PATCH] added comments for some functions --- Compression/src/HEncoder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Compression/src/HEncoder.java b/Compression/src/HEncoder.java index e0ebaa1d..37bd8fc0 100644 --- a/Compression/src/HEncoder.java +++ b/Compression/src/HEncoder.java @@ -4,8 +4,8 @@ import java.util.HashMap; public class HEncoder { - public HashMap encoder = new HashMap<>(); - public HashMap decoder = new HashMap<>(); + public HashMap encoder = new HashMap<>(); // in order to encode + public HashMap decoder = new HashMap<>(); // in order to decode private static class Node { @@ -81,6 +81,7 @@ public class HEncoder { } + // compression work done here public String compress(String str) { String rv = ""; for (int i = 0; i < str.length(); ++i) { @@ -88,7 +89,9 @@ public class HEncoder { } return rv; } + + //in order to decompress public String decompress(String str) { String s = ""; String code = "";