lab_huffman
Hazardous Huffman Codes
decoder Namespace Reference

decoder namespace: collection of functions used for running the decoder program. More...

Functions

int main (const std::vector< std::string > &args)
 Main method of the program, should you choose to run it as a command line version. More...
 
void printUsage (const std::string &programName)
 Prints the usage of the command line version. More...
 
void decodeFile (const std::string &inputName, const std::string &treeName, const std::string &outputName)
 Decodes a file using the given HuffmanTree. More...
 

Detailed Description

decoder namespace: collection of functions used for running the decoder program.

Function Documentation

◆ decodeFile()

void decoder::decodeFile ( const std::string inputName,
const std::string treeName,
const std::string outputName 
)

Decodes a file using the given HuffmanTree.

Parameters
inputNameName of the file to be decompressed.
treeNameName of the file from which to read the HuffmanTree.
outputNameName of the file to write decompressed output to.

◆ main()

int decoder::main ( const std::vector< std::string > &  args)

Main method of the program, should you choose to run it as a command line version.

Parameters
argsThe command line arguments, with args[0] being the program name.

◆ printUsage()

void decoder::printUsage ( const std::string programName)

Prints the usage of the command line version.

Parameters
programNameThe name of the program.