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
char *array[5]; // Array of tokens | |
void readCommand(char *commandString){ // A utility function used for splitting given command on parts - string token, use of space as a divider | |
int i = 0; char *token; | |
// Array[i] holds the following | |
array[0] = NULL; // Operation (encode. decode) | |
array[1] = NULL; // Target (file, console) | |
array[2] = NULL; // Input file path | |
array[3] = NULL; // Optional operation ('write' to the file) | |
array[4] = NULL; // Output file path |
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
// Hencoding.cpp : Defines the entry point for the console application. | |
// SLAWOMIR MLYNAROWICZ - 12100888 | |
// RICHARD DUNN - 12100858 | |
// 1BCT 2014, CT103, NUIG | |
//#include "stdafx.h" | |
#pragma once | |
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> |
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
// C Program for Efficient Huffman Coding for Sorted input | |
// http://www.geeksforgeeks.org/greedy-algorithms-set-3-huffman-coding-set-2/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
// This constant can be avoided by explicitly calculating height of Huffman Tree | |
#define MAX_TREE_HT 100 | |
/* Modification -----------*/ |