William Cheng 7f1e79f7d2
[C] Optimize memory usage when printing JSON (#18072)
* cJSON generate unformatted json to save memory during large objects handling

* update sample

* add option to use cjson print unforamtted in client

* remove unused test template files

* add new samples

* update workflow

* update doc

* fix model filename

* fix inclulde

---------

Co-authored-by: Hemant Zope <42613258+zhemant@users.noreply.github.com>
Co-authored-by: Hemant Zope <hemantzope2008@gmail.com>
2024-03-11 16:18:08 +08:00

19 lines
409 B
C

#ifndef INCLUDE_BINARY_H
#define INCLUDE_BINARY_H
#include <stdint.h>
typedef struct binary_t
{
uint8_t* data;
unsigned int len;
} binary_t;
binary_t* instantiate_binary_t(char* data, int len);
char *base64encode(const void *b64_encode_this, int encode_this_many_bytes);
char *base64decode(const void *b64_decode_this, int decode_this_many_bytes, int *decoded_bytes);
#endif // INCLUDE_BINARY_H