• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 , "AVX512"
15 , NULL
16 } ;
17 
18 char **codecs = _codecs;
19 
20 int
codec_supported(int flags)21 codec_supported (int flags)
22 {
23 	// Check if given codec is supported by trying to decode a test string:
24 	char *a = "aGVsbG8=";
25 	char b[10];
26 	size_t outlen;
27 
28 	return (base64_decode(a, strlen(a), b, &outlen, flags) != -1);
29 }
30