kandr

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0b5f803354afe70a0648882e26078374bc4d9fc4
parent bc4022292b3366ef3f4dfbdd1347aa15c8297e83
Author: phoebos <ben@bvnf.space>
Date:   Tue,  6 Jul 2021 20:27:15 +0100

base64: add lookup table

Diffstat:
Mbase64.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/base64.c b/base64.c @@ -26,6 +26,18 @@ #define BUF_SIZE 1000 +const char tbl_base64[] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', + '=' /* termination character */ +}; + static void usage(const char *name) { fprintf(stderr, "usage: %s [-d] [FILE]\n", name); }