<commit_before>/*
 *  Base-64 support
 */

#include "duk_internal.h"

/* dst length must be exactly ceil(len/3)*4 */
void duk_util_base64_encode(const unsigned char *src, unsigned char *dst, size_t len) {
	unsigned int i, t, snip;
	unsigned int x, y, t;
	unsigned const char *src_end = src + len;

	while (src < src_end) {
		snip = 4;
		t = 0;
		for (i = 0; i < 3; i++) {
			t = t << 8;
			if (src >= src_end) {
				snip--;
			} else {
				t += (unsigned int) (*src++);
			}
		}

		/*
		 *  Missing bytes    snip     base64 example
		 *    0               4         XXXX
		 *    1               3         XXX=
		 *    2               2         XX==
		 */<commit_msg>trivia fix to base64 encoding<commit_after>/*
 *  Base-64 support
 */

#include "duk_internal.h"

/* dst length must be exactly ceil(len/3)*4 */
void duk_util_base64_encode(const unsigned char *src, unsigned char *dst, size_t len) {
	unsigned int i, snip;
	unsigned int x, y, t;
	unsigned const char *src_end = src + len;

	while (src < src_end) {
		snip = 4;
		t = 0;
		for (i = 0; i < 3; i++) {
			t = t << 8;
			if (src >= src_end) {
				snip--;
			} else {
				t += (unsigned int) (*src++);
			}
		}

		/*
		 *  Missing bytes    snip     base64 example
		 *    0               4         XXXX
		 *    1               3         XXX=
		 *    2               2         XX==
		 */
{'fraction_non_alphanumeric': 0.13605947955390335, 'fraction_numerical': 0.02973977695167286, 'mean_word_length': 1.62890625, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '1267533', 'n_tokens_mistral': 575, 'n_tokens_neox': 483, 'n_words': 155}