<commit_before># base64_arduino

Base64 encoder/decoder for arduino repo

[![npm](https://img.shields.io/npm/l/express.svg)]()
[![Build Status](https://travis-ci.com/Densaugeo/base64_arduino.svg?branch=master)](https://travis-ci.com/github/Densaugeo/base64_arduino)

## Installation

Add base64.cpp and base64.hpp to your project folder or library search path, put `#include "base64.hpp"` in your source, and pass base64.cpp to your compiler

## Usage

Binary to base64 example:
~~~C++
unsigned char binary[] = {133, 244, 117, 206, 178, 195};
unsigned char base64[9]; // 8 bytes for output + 1 for null terminator

unsigned int base64_length = encode_base64(binary, 6, base64);

printf("%d\n", base64_length); // Prints "8"
printf((char *) base64); // Prints "hfR1zrLD"
~~~<commit_msg>Clarify examples<commit_after># base64_arduino

Base64 encoder/decoder for arduino repo

[![npm](https://img.shields.io/npm/l/express.svg)]()
[![Build Status](https://travis-ci.com/Densaugeo/base64_arduino.svg?branch=master)](https://travis-ci.com/github/Densaugeo/base64_arduino)

## Installation

Add base64.cpp and base64.hpp to your project folder or library search path, put `#include "base64.hpp"` in your source, and pass base64.cpp to your compiler

## Usage (Arduino)

There is an example Arduino sketch in the `arduino-test` folder.

## Usage (libc)

Binary to base64 example:
~~~C++
unsigned char binary[] = {133, 244, 117, 206, 178, 195};
unsigned char base64[9]; // 8 bytes for output + 1 for null terminator

unsigned int base64_length = encode_base64(binary, 6, base64);

printf("%d\n", base64_length); // Prints "8"
printf((char *) base64); // Prints "hfR1zrLD"
~~~
{'fraction_non_alphanumeric': 0.148859543817527, 'fraction_numerical': 0.06482593037214886, 'mean_word_length': 5.1286764705882355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3643974', 'n_tokens_mistral': 669, 'n_tokens_neox': 576, 'n_words': 164}