1 #include <string.h>
2
3 #include "../include/libbase64.h"
4
5 static char *_codecs[] =
6 { "AVX2"
7 , "NEON32"
8 , "NEON64"
9 , "plain"
10 , "SSSE3"
11 , "SSE41"
12 , "SSE42"
13 , "AVX"
14 , NULL
15 } ;
16
17 char **codecs = _codecs;
18
19 int
codec_supported(int flags)20 codec_supported (int flags)
21 {
22 // Check if given codec is supported by trying to decode a test string:
23 char *a = "aGVsbG8=";
24 char b[10];
25 size_t outlen;
26
27 return (base64_decode(a, strlen(a), b, &outlen, flags) != -1);
28 }
29