summaryrefslogtreecommitdiffstats
path: root/labb6/src/encoding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'labb6/src/encoding.cpp')
-rwxr-xr-xlabb6/src/encoding.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/labb6/src/encoding.cpp b/labb6/src/encoding.cpp
new file mode 100755
index 0000000..b6edb84
--- /dev/null
+++ b/labb6/src/encoding.cpp
@@ -0,0 +1,44 @@
+// This is the CPP file you will edit and turn in.
+// Also remove these comments here and add your own, along with
+// comments on every function and on complex code sections.
+// TODO: remove this comment header
+
+#include "encoding.h"
+// TODO: include any other headers you need
+
+map<int, int> buildFrequencyTable(istream& input) {
+ // TODO: implement this function
+ map<int, int> freqTable;
+ return freqTable;
+}
+
+HuffmanNode* buildEncodingTree(const map<int, int> &freqTable) {
+ // TODO: implement this function
+ return nullptr;
+}
+
+map<int, string> buildEncodingMap(HuffmanNode* encodingTree) {
+ // TODO: implement this function
+ map<int, string> encodingMap;
+ return encodingMap;
+}
+
+void encodeData(istream& input, const map<int, string> &encodingMap, obitstream& output) {
+ // TODO: implement this function
+}
+
+void decodeData(ibitstream& input, HuffmanNode* encodingTree, ostream& output) {
+ // TODO: implement this function
+}
+
+void compress(istream& input, obitstream& output) {
+ // TODO: implement this function
+}
+
+void decompress(ibitstream& input, ostream& output) {
+ // TODO: implement this function
+}
+
+void freeTree(HuffmanNode* node) {
+ // TODO: implement this function
+}