Graphviz 13.1.2~dev.20250723.2326
Loading...
Searching...
No Matches
base64.h File Reference

Base64 encoding. More...

#include <stddef.h>
#include <util/api.h>
Include dependency graph for base64.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

UTIL_API size_t gv_base64_size (size_t source_size)
 
UTIL_API char * gv_base64 (const unsigned char *source, size_t size)
 

Function Documentation

◆ gv_base64()

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.

Parameters
sourcePointer to the start of data to encode
sizeNumber of bytes in the source
Returns
A buffer of the encoded data

Definition at line 14 of file base64.c.

References base64_alphabet, gv_alloc(), and gv_base64_size().

Referenced by kitty_write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_base64_size()

UTIL_API size_t gv_base64_size ( size_t  source_size)

how many bytes does it take to encode a given source data length?

Parameters
source_sizeThe number of bytes in the source to encoding
Returns
The number of bytes required in the destination of encoding

Definition at line 12 of file base64.c.

References div_up().

Referenced by gv_base64(), and kitty_write().

Here is the call graph for this function:
Here is the caller graph for this function: