-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpack.h
More file actions
42 lines (28 loc) · 742 Bytes
/
pack.h
File metadata and controls
42 lines (28 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef PACK_H
#define PACK_H
#include "string_tree.h"
typedef struct packinfo{
size_t nodes;
size_t text_length;
} packinfo;
typedef struct pack{
packinfo info;
void** values;
uint32_t* text_shifts;
uint8_t *flags;
char* texts;
} pack;
pack pack_tree(token* begin);
void* find_pack_element(char* src, pack package);
void remove_pack(pack package);
// ToDo below //
void import_words(char* path);
void import_tree(char* path);
void export_tree(char* path, pack package);
void* search_pack(char* src, pack package);
void* update_pack(char* src, void* element, pack package);
// text not included
// stored in pack.info.text_length
size_t get_pack_data_length(pack package);
token* unpack_tree(void* pack);
#endif