Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
huffmanCoding/Decompress.H
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
36 lines (26 sloc)
584 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __DECOMPRESS_H__ | |
#define __DECOMPRESS_H__ | |
#include "Huffman.H" | |
#include<queue> | |
#include <memory> | |
using namespace std; | |
struct Header; | |
class Decompress : public Huffman { | |
shared_ptr<Header> _header; // Will hold parse Compressed file info | |
shared_ptr<Node> generateTreeHelper(string& bin); | |
void parseText(); | |
void generateTree(); | |
public: | |
Decompress(string fname): Huffman(fname){} | |
void decompressFile(string output); | |
}; | |
struct Header{ | |
int bodySize; | |
int preorderSize; | |
string preorderStr; | |
queue<char> letters; | |
string body; | |
Header(){} | |
~Header(){} | |
}; | |
#endif |