From 93c6b29368d1e0487937b433bc6e678da0058055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 1 Dec 2020 15:25:23 +0100 Subject: given code l6 --- labb6/src/encoding.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 labb6/src/encoding.cpp (limited to 'labb6/src/encoding.cpp') 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 buildFrequencyTable(istream& input) { + // TODO: implement this function + map freqTable; + return freqTable; +} + +HuffmanNode* buildEncodingTree(const map &freqTable) { + // TODO: implement this function + return nullptr; +} + +map buildEncodingMap(HuffmanNode* encodingTree) { + // TODO: implement this function + map encodingMap; + return encodingMap; +} + +void encodeData(istream& input, const map &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 +} -- cgit v1.2.1