Skip to content
Permalink
a41fe79404
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
45 lines (33 sloc) 880 Bytes
/* Copyright (C) 2023 Harry Clark - Student No. 12340530 */
/* DATE: 13/03/23 */
/* HUFFMAN CODE DEMONSTRATION */
/* JUST A LITTLE THING I WANTED TO MAKE FOR FUN AFTER WATCHING A
/* TOM SCOTT VIDEO ABOUT THE SUBJECT */
/* THESE ARE THE TYPES AND FUNCTIONALITY PERTAINING TO THIS ALGORITHM */
#ifndef HUFFMAN_TYPES
#define HUFFMAN_TYPES
/* SYSTEM INCLUDES */
#include <stdio.h>
/* NESTED INCLUDES */
#include "common.h"
typedef struct NODE
{
typedef UNK_SIZE* FREQUENCY;
typedef U8* CHAR;
NODE* LEAF(FREQUENCY, CHAR);
NODE* INTERNAL_NODE(FREQUENCY, CHAR);
NODE* LEFT_PTR();
NODE* RIGHT_PTR();
};
typedef struct ENCODER : NODE
{
typedef U8* DATA[];
typedef UNK_SIZE* BITWISE_LENGTH;
};
typedef struct TREE
{
ENCODER* ENCODE(UNK_8* ENCODE_CHAR);
ENCODER* DECODE(UNK_8* DECODE_CHAR);
TREE* BUILD_TREE(void);
};
#endif