Graphviz 13.0.0~dev.20250210.0415
|
Base64 encoding. More...
#include <stddef.h>
Go to the source code of this file.
Macros | |
#define | UTIL_API /* nothing */ |
Functions | |
UTIL_API size_t | gv_base64_size (size_t source_size) |
UTIL_API char * | gv_base64 (const unsigned char *source, size_t size) |
#define UTIL_API /* nothing */ |
hide the symbols this header declares by default
The expectation is that users of this header (applications, shared libraries, or static libraries) want to call gv_base64
but not re-export it to their users. This annotation is only correct while the containing library is built statically. If it were built as a shared library, gv_base64
would need to have default
visibility (and thus be unavoidably re-exported) in order to be callable.
UTIL_API char * gv_base64 | ( | const unsigned char * | source, |
size_t | size | ||
) |
Base64 encode some data
This function does not return on failure, like memory allocation. It calls exit
. The caller is expected to free
the returned pointer.
source | Pointer to the start of data to encode |
size | Number of bytes in the source |
Definition at line 14 of file base64.c.
References base64_alphabet, gv_alloc(), and gv_base64_size().
Referenced by core_loadimage_svg(), and kitty_write().
UTIL_API size_t gv_base64_size | ( | size_t | source_size | ) |
how many bytes does it take to encode a given source data length?
source_size | The number of bytes in the source to encoding |
Definition at line 12 of file base64.c.
References div_up().
Referenced by core_loadimage_svg(), gv_base64(), and kitty_write().