FBB:...ream(3bobcat)

✨ NAME ✨

FBB::IBase64Stream β€” a std::istream that does base64 encoding and decoding, bestie πŸ’–

This one lives in the 3bobcat section of the manual, so if you were hunting for it, hi, you found it 🫢


🌸 SYNOPSIS 🌸

#include <bobcat/ibase64stream>

Linking option: -lbobcat


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got info chillin' on some separate std::istream, and you wanna base64 encode it or decode it. That's literally what FBB::IBase64Stream objects are for, no cap ✨

Here's the cute part: IBase64Stream is a class template, and it takes an FBB::CryptType template non-type parameter. So:

  • objects of the class FBB::IBase64Stream<FBB::ENCRYPT> base64 encode the information they receive πŸ”₯
  • objects of the class FBB::IBase64Stream<FBB::DECRYPT> base64 decode the information they receive πŸ’…

πŸ’œ NAMESPACE πŸ’œ

FBB

Every constructor, member, operator and manipulator mentioned in this man-page is defined in the namespace FBB. All of them. Every single one πŸ‘‘


🌈 INHERITS FROM 🌈

  • FBB::IBase64Buf (private)
  • std::istream

πŸŽ€ CONSTRUCTORS πŸŽ€

  • IBase64Stream<CryptType>(std::istream &in, size_t bufSize = 1000) β€” this constructor initializes a std::istream and hooks it up with an FBB::IBase64Buf stream buffer. The IBase64Buf's constructor receives all the arguments that get passed to this constructor 🫢

So here's the vibe breakdown:

  • IBase64Stream<ENCRYPT> objects perform base64 encoding;
  • IBase64Stream<DECRYPT> objects perform base64 decoding;
  • IBase64Stream<CryptType> objects obtain the bytes to encode or decode from std::istream &in;
  • the internally used IFilterBuf is initialized with a buffer of size bufSize, using a lower bound of 100.

The constructor uses a configurable buffer size for reading. And listen, this part matters: characters that were read into the buffer but are not part of the actual base64 encoded data are unavailable after completing the base64 decrypting 😭 so if information beyond the base64 input block should remain available, then specify a buffer size of 1. Yeah. 1.

Copy and move constructors (and assignment operators) are not available. Not a thing. Don't try it πŸ™ˆ

πŸ‘‘ INHERITED MEMBERS πŸ‘‘

Since the class uses public derivation from std::istream, all members of this class can be used. go off, std::istream πŸ’…


⭐ EXAMPLE ⭐

#include <iostream>

#include <bobcat/ibase64stream>

using namespace std;
using namespace FBB;

int main()
{
    IBase64Stream<ENCRYPT> in(cin);
}

πŸ“ FILES πŸ“

bobcat/ibase64stream β€” defines the class interface


🧚 SEE ALSO 🧚

bobcat(7), ibase64buf(3bobcat)


πŸ’€ BUGS πŸ’€

None Reported. (iconic behaviour, honestly ✨)


🌸 BOBCAT PROJECT FILES 🌸

Debian Bobcat project files:

  • libbobcat6: debian package containing the shared library, changelog and copyright note;
  • libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;

πŸ’– BOBCAT πŸ’–

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.


This is free software, distributed under the terms of the GNU General Public License (GPL).


πŸ’œ AUTHOR πŸ’œ

Frank B. Brokken (f.b.brokken@rug.nl).


and that's the whole page, bestie, we ate and left no crumbs πŸŽ€ this was the 3bobcat manual page from libbobcat-dev_6.15.01, dated 2005-2026, brought to you by FBB β€” go forth and base64 responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from