Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef HUFFMAN_HUFF_H
- #define HUFFMAN_HUFF_H
- #include <unistd.h>
- #include <fcntl.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
- #include <string.h>
- /*Node*/
- typedef struct node {
- int data;
- /*Lower values indicate higher priority*/
- int priority;
- struct node* left;
- struct node* right;
- struct node* next;
- } Node;
- Node *makeTreeDecode(int , Node **);
- Node* newNode(int, int);
- Node *pop(Node** head);
- void push(Node**, int , int);
- void pushTree(Node** , Node *, Node* );
- void makecode(Node *, int ,int *, int, int*);
- void writeHeaderOut(int out, int i, int *chars, const int *freqs2,
- const int *val);
- Node *makeTree(int pqSize, Node **head, Node *temp1, Node *temp2);
- void initPQ(const int *freqs, int i, int *chars, int *pqSize, Node **head);
- void writeBodyOut(int in, int out, int i, const int *codelens,
- int toAddSize, uint8_t *toPack, int carrySize, int carryChar,
- const int *codes, char *buff, int j);
- void freeTree(Node*);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement