blob: fc66d2f63f334dac332325dad73c70fdd5102d80 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#ifndef __DATA_CODER_H__
2#define __DATA_CODER_H__
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8char get_byte(char* buff, int* offset, int src_len);
9short get_short(char* buff, int* offset, int src_len);
10int get_int(char* buff, int* offset, int src_len);
11long long get_long(char* buff, int* offset, int src_len);
12float get_float(char* buff, int* offset, int src_len);
13double get_double(char* buff, int* offset, int src_len);
14char* get_string(char* buff, int* offset, int src_len);
15char* get_string2(char* buff, int* offset, int src_len);
16int get_binary(char* buff, int* offset, char* output, int src_len, int des_len);
17
18void put_byte(char* buff, int* offset, const char input);
19void put_short(char* buff, int* offset, const short input);
20void put_int(char* buff, int* offset, const int input);
21void put_long(char* buff, int* offset, const long long input);
22void put_float(char* buff, int* offset, const float input);
23void put_double(char* buff, int* offset, const double input);
24void put_string(char* buff, int* offset, const char* input);
25void put_binary(char* buff, int* offset, const char* input, int len);
26
27#ifdef __cplusplus
28}
29#endif
30
31#endif
32