SHARE
TWEET

Untitled

a guest May 25th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef HUFFMAN_HUFF_H
  2. #define HUFFMAN_HUFF_H
  3. #include <unistd.h>
  4. #include <fcntl.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <stdint.h>
  8. #include <string.h>
  9.  
  10. /*Node*/
  11. typedef struct node {
  12.     int data;
  13.     /*Lower values indicate higher priority*/
  14.     int priority;
  15.     struct node* left;
  16.     struct node* right;
  17.     struct node* next;
  18. } Node;
  19.  
  20. Node *makeTreeDecode(int , Node **);
  21. Node* newNode(int, int);
  22. Node *pop(Node** head);
  23. void push(Node**, int , int);
  24. void pushTree(Node** , Node *, Node* );
  25. void makecode(Node *, int ,int *, int, int*);
  26. void writeHeaderOut(int out, int i, int *chars, const int *freqs2,
  27.                     const int *val);
  28. Node *makeTree(int pqSize, Node **head, Node *temp1, Node *temp2);
  29. void initPQ(const int *freqs, int i, int *chars, int *pqSize, Node **head);
  30. void writeBodyOut(int in, int out, int i, const int *codelens,
  31.         int toAddSize, uint8_t *toPack, int carrySize, int carryChar,
  32.                   const int *codes, char *buff, int j);
  33. void freeTree(Node*);
  34.  
  35. #endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top