aboutsummaryrefslogtreecommitdiffstats
path: root/src/base64.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 09:43:57 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit4711fdf527f416faee8ff19e15f050d4b48dcfb2 (patch)
tree6b18712ec44cce5713ddef1a21aec5f12651d901 /src/base64.c
parent248a874d7425749d29cf900a1c3783c624ea8d8c (diff)
downloadserd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.gz
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.bz2
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.zip
[WIP] Generalize node construction API
Diffstat (limited to 'src/base64.c')
-rw-r--r--src/base64.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/base64.c b/src/base64.c
deleted file mode 100644
index 50ec3981..00000000
--- a/src/base64.c
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2011-2020 David Robillard <d@drobilla.net>
-// SPDX-License-Identifier: ISC
-
-#include "base64.h"
-
-#include "exess/exess.h"
-#include "serd/string.h"
-
-#include <stdlib.h>
-
-void*
-serd_base64_decode(const char* const str, const size_t len, size_t* const size)
-{
- const size_t max_size = exess_base64_decoded_size(len);
-
- void* const buf = malloc(max_size);
- const ExessVariableResult r = exess_read_base64(max_size, buf, str);
- if (r.status) {
- *size = 0;
- free(buf);
- return NULL;
- }
-
- *size = r.write_count;
-
- return buf;
-}