Advertisement
Guest User

Untitled

a guest
May 26th, 2022
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. struct Node* restore_tree(struct Node *node, T_bit_file *bf, struct T_smart_byte *byte){
  2.     int bit = f_get_bit(bf);
  3.     if (bit) {
  4.         for (int i = 0; i < 8; ++i) {
  5.             set_bit(byte, f_get_bit(bf), NULL);
  6.         }
  7.         return create_queue_item((char)byte->data, EOF, NULL, NULL);
  8.     }
  9.     node = create_queue_item(EOF, -1, NULL, NULL);
  10.     node->left = restore_tree(NULL, bf, byte);
  11.     node->right = restore_tree(NULL, bf, byte);
  12.     return node;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement