Revision 2c47b73,
932 bytes
checked in by Hal Finkel <hfinkel@…>, 6 years ago
(diff) |
more work on adding SZ (latest version)
|
-
Property mode set to
100644
|
Line | |
---|
1 | /** |
---|
2 | * @file DynamicByteArray.h |
---|
3 | * @author Sheng Di |
---|
4 | * @date April, 2016 |
---|
5 | * @brief Header file for Dynamic Byte Array. |
---|
6 | * (C) 2016 by Mathematics and Computer Science (MCS), Argonne National Laboratory. |
---|
7 | * See COPYRIGHT in top-level directory. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _DynamicByteArray_H |
---|
11 | #define _DynamicByteArray_H |
---|
12 | |
---|
13 | #ifdef __cplusplus |
---|
14 | extern "C" { |
---|
15 | #endif |
---|
16 | |
---|
17 | #include <stdio.h> |
---|
18 | typedef struct DynamicByteArray |
---|
19 | { |
---|
20 | unsigned char* array; |
---|
21 | size_t size; |
---|
22 | size_t capacity; |
---|
23 | } DynamicByteArray; |
---|
24 | |
---|
25 | void new_DBA(DynamicByteArray **dba, size_t cap); |
---|
26 | void convertDBAtoBytes(DynamicByteArray *dba, unsigned char** bytes); |
---|
27 | void free_DBA(DynamicByteArray *dba); |
---|
28 | unsigned char getDBA_Data(DynamicByteArray *dba, size_t pos); |
---|
29 | void addDBA_Data(DynamicByteArray *dba, unsigned char value); |
---|
30 | void memcpyDBA_Data(DynamicByteArray *dba, unsigned char* data, size_t length); |
---|
31 | |
---|
32 | #ifdef __cplusplus |
---|
33 | } |
---|
34 | #endif |
---|
35 | |
---|
36 | #endif /* ----- #ifndef _DynamicByteArray_H ----- */ |
---|
Note: See
TracBrowser
for help on using the repository browser.