<commit_before>/*
    Copyright (C) 2019-2020, <NAME>.
    Released under the terms of Apache License 2.0.
*/

// Multiple include protection...
#ifndef _BASE_64_H_
#define _BASE_64_H_

// Includes...

// Build environment configuration...
#include <pistache/config.h>

// Standard C++ / POSIX system headers...
#include <cstddef>
#include <filesystem>
#include <string>
#include <vector>

// A class for performing decoding to raw bytes from base 64 encoding...
class Base64Decoder {
  // Public methods...
public:
  // Constructor...
  explicit Base64Decoder(const std::string &Base64EncodedString)
      : m_Base64EncodedString(Base64EncodedString) {}

  // Calculate length of decoded raw bytes from that would be generated if
  //  the base 64 encoded input buffer was decoded. This is not a static
  //  method because we need to examine the string...
  std::vector<std::byte>::size_type CalculateDecodedSize() const;

  // Decode base 64 encoding into raw bytes...
  const std::vector<std::byte> &Decode();

  // Get raw decoded data...
  const std::vector<std::byte> &GetRawDecodedData() const noexcept {<commit_msg>Removed unnecessary standard filesystem library. (#726)<commit_after>/*
    Copyright (C) 2019-2020, <NAME>.
    Released under the terms of Apache License 2.0.
*/

// Multiple include protection...
#ifndef _BASE_64_H_
#define _BASE_64_H_

// Includes...

// Build environment configuration...
#include <pistache/config.h>

// Standard C++ / POSIX system headers...
#include <cstddef>
#include <string>
#include <vector>

// A class for performing decoding to raw bytes from base 64 encoding...
class Base64Decoder {
  // Public methods...
public:
  // Constructor...
  explicit Base64Decoder(const std::string &Base64EncodedString)
      : m_Base64EncodedString(Base64EncodedString) {}

  // Calculate length of decoded raw bytes from that would be generated if
  //  the base 64 encoded input buffer was decoded. This is not a static
  //  method because we need to examine the string...
  std::vector<std::byte>::size_type CalculateDecodedSize() const;

  // Decode base 64 encoding into raw bytes...
  const std::vector<std::byte> &Decode();

  // Get raw decoded data...
  const std::vector<std::byte> &GetRawDecodedData() const noexcept {
{'fraction_non_alphanumeric': 0.12037037037037036, 'fraction_numerical': 0.027777777777777776, 'mean_word_length': 3.6024340770791077, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '4593519', 'n_tokens_mistral': 719, 'n_tokens_neox': 651, 'n_words': 237}