diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-12-01 15:25:23 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-12-01 15:25:23 +0100 |
| commit | 93c6b29368d1e0487937b433bc6e678da0058055 (patch) | |
| tree | 5e749adfecf2eab82b5e78bbeacc52fc8e2298fb /labb6/src/encoding.cpp | |
| parent | d4f35cf45ebc655d92cde8abb5c9a1c2822a08ba (diff) | |
| download | tddd86-93c6b29368d1e0487937b433bc6e678da0058055.tar.gz | |
given code l6
Diffstat (limited to 'labb6/src/encoding.cpp')
| -rwxr-xr-x | labb6/src/encoding.cpp | 44 |
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
+}
|
