]>
git.gir.st - base65536.git/blob - base65536.h
1 /* base65536 semi-library header.
2 (C) 2016 Tobias Girstmair, http://isticktoit.net/
3 Released under the GNU GPL v3. See LICENSE for details. */
5 #ifndef __BASE65536_H__
6 #define __BASE65536_H__
7 #define B65536_TREE_SIZE 257
9 int base65536_encode_char (const int* in_buf
);
10 int base65536_decode_char (const int in_cp
, int* out_buf
);
12 int codepoint_to_utf8 (int unicode
, char* buf
);
13 int utf8_to_codepoint (char* buf
);
15 struct block
* get_block_by_index (struct block
* tree
, int index
, int len
, int pos
);
16 struct block
* get_block_by_start (struct block
* tree
, int start
, int len
, int pos
);
18 #define NOT_FOUND -2 /*for when tree_find_*() does not return a valid result*/
21 int tree_find_index (int block
);
22 int tree_find_block(int index
);