FBB::...e64Buf(3bobcat)
π
FBB::...e64Buf β like, the whole vibe (from the bobcat manual, section 3)
okay bestie, sit down, hydrate, because we're talking about FBB::...e64Buf β the Base64 converting Stream Buffer β and honestly? she's iconic. it lives in the bobcat manual (section 3, the library-functions girlies), and this whole page is about her little sister FBB::IBase64Buf, the input filtering stream buffer that does base64 conversion. no cap. π
β¨ NAME β¨
FBB::IBase64Buf β an Input Filtering stream buffer whose whole entire job is doing base64 conversion. she filters, she converts, she slays. π
β¨ SYNOPSIS β¨
#include <bobcat/ibase64buf>
Linking option: -lbobcat
that's it. that's the whole thing. go off. π¦
β¨ DESCRIPTION β¨
so here's the tea β β the info that IBase64Buf objects hand you has already been through base64 encoding or decoding. the stuff that needs converting gets delivered to your IBase64Buf object through std::istream objects. that's the pipeline. she's a middleman and she loves it.
okay and now the plot twist: IBase64Buf is a class template, and it takes an FBB::CryptType template non-type parameter. meaning:
- objects of the class
FBB::IBase64Buf<FBB::ENCRYPT>base64 encode whatever they receive π« - objects of the class
FBB::IBase64Buf<FBB::DECRYPT>base64 decode whatever they receive π
also go peek at the ENUMERATION section below, she explains more. iykyk.
β¨ NAMESPACE β¨
FBB
literally every constructor, member, operator and manipulator mentioned in this man-page lives in the namespace FBB. all of them. together. one big happy namespace. π
β¨ INHERITS FROM β¨
FBB::IFilterBuf
she gets it from her mama. π«Ά
β¨ ENUMERATION β¨
IBase64Buf objects either base64 encode or decode information β pick a lane, she contains multitudes:
IBase64Bufobjects of the classFBB::IBase64Buf<FBB::ENCRYPT>base64 encode the data they receiveIBase64Bufobjects of the classFBB::IBase64Buf<FBB::DECRYPT>base64 decode the data they receive
the values ENCRYPT and DECRYPT are defined in the enum CryptType, which is defined in the FBB namespace. so yes, you write FBB::ENCRYPT and FBB::DECRYPT and it just works. periodt. β¨
β¨ CONSTRUCTOR β¨
IBase64Buf<CryptType>(std::istream &in, size_t bufSize = 1000)β this constructor initializes the streambuf. the streambuf! initialized! π
and now the deets, one by one, because details are the main character:
IBase64Buf<ENCRYPT>objects perform base64 encoding;IBase64Buf<DECRYPT>objects perform base64 decoding;IBase64Buf<CryptType>objects obtain the bytes to encode or decode fromstd::istream ∈- the
IFilterBufbase class is initialized with a buffer of sizebufSize, using a lower bound of100. so don't get cute with0bestie, there's a floor. π
the constructor uses a configurable buffer size for reading. now listen β this part is important:
characters that were read into the buffer but are not part of the actual base64 encoded data are unavailable after completing the base64 decrypting. gone. ghosted. if information beyond the base64 input block should remain available, then specify a buffer size of 1.
and one more thing, and I need you to hear me:
Copy and move constructors (and assignment operators) are not available.
like, at all. don't try it. she said no. π
β¨ MEMBER FUNCTIONS β¨
all members of FBB::IFilterBuf are available, because IBase64Buf inherits from this class. inheriting = free stuff. we love that for her. π
β¨ EXAMPLE β¨
okay so this example shows the construction of IBase64Buf<ENCRYPT> objects β encode β which are used to initialize a std::istream object. the information read from this istream is base64 encoded. cute, right? π
IBase64Buf<DECRYPT> objects β decode β read base64 encoded information from std::istream objects and decode it again. reverse uno. π
the std::istream din object is initialized with the IBase64Buf<DECRYPT> object, and its content is sent to std::cout. the information that is presented at std::cin and that appears at std::cout should be identical. round trip, queen. β¨
#include <iostream>
#include <istream>
#include <bobcat/ibase64buf>
using namespace std;
using namespace FBB;
int main(int argc, char **argv)
{
switch (argv[1][0])
{
case βeβ:
{
IBase64Buf<ENCRYPT> encode(cin);
istream ein(&encode);
cout << ein.rdbuf();
}
break;
case βdβ:
{
IBase64Buf<DECRYPT> decode(cin);
istream din(&decode);
cout << din.rdbuf();
}
break;
case βbβ:
{
IBase64Buf<ENCRYPT> encode(cin);
istream ein(&encode);
IBase64Buf<DECRYPT> decode(ein);
istream din(&decode);
cout << din.rdbuf();
}
break;
default:
cout << "Usage: " << argv[0] << " [edb] < infile > outfile\n"
"to base64 -e-ncode, -d-ecode or -b-oth\n";
break;
}
}
e for encode, d for decode, b for both. it's giving command-line simplicity. πΈ
β¨ FILES β¨
bobcat/ibase64bufβ defines the class interface
β¨ SEE ALSO β¨
bobcat(7), isymcryptstreambuf(3bobcat), ibase64stream(3bobcat), ifilterbuf(3bobcat), ofilterbuf(3bobcat), std::streambuf.
the whole friend group. go say hi. π¦
β¨ BUGS β¨
None reported.
a clean record. she's unproblematic. we stan. π
β¨ BOBCAT PROJECT FILES β¨
https://fbb-git.gitlab.io/bobcat/β gitlab project page;
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.
acronym reveal of the century. π₯
β¨ COPYRIGHT β¨
this is free software, distributed under the terms of the GNU General Public License (GPL). free as in freedom, bestie. π
β¨ AUTHOR β¨
Frank B. Brokken (f.b.brokken@rug.nl).
the icon. the legend. the moment. π
and that's the whole page, bestie!! πβ¨ this was libbobcat-dev_6.15.01, dated 2005-2026, straight from the FBB::...e64Buf(3bobcat) manual. go forth and base64 responsibly. mwah. π
π
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms