FB...am(3bobcat)
β¨ NAME β¨
FBB::ImmapStream β an Input Stream that uses mmap(2) through FBB::MmapBuf π«Ά
okay bestie, this is man page FB...am, section 3bobcat β it's from the bobcat library. Let me tell you everything π
πΈ SYNOPSIS πΈ
#include <bobcat/immapstream>
Linking option: -lbobcat
π DESCRIPTION π
So like. FBB::ImmapStream objects are for extracting information from files that get made available in the virtual address space of the calling process. The whole "living in your virtual address space" situation is handled by the class's privately inherited FBB::MmapBuf (which is a std::streambuf class).
By mapping files into the process's virtual address space, the time needed to process those files is usually dramatically reduced β it's giving speed, it's giving efficiency, it's giving main character energy π₯
Heads up though: if theFBB::MmapBufbase class can't figure out the size of the file you specified β or if the (un)mapping can't be done β then anstd::exceptiongets thrown and an error message gets written tocerr. So watch your terminal, bestie π
π NAMESPACE π
FBB
Every single constructor, member, operator and manipulator mentioned in this man-page is defined in the namespace FBB. periodt.
π¦ INHERITS FROM π¦
std::istream, and privately from FBB::MmapBuf.
π CONSTRUCTORS π
ImmapStream()β the default constructor is lowkey just vibes: it merely constructs an emptyImmapStreamobject. To turn it into something actually usable, use move assignment.ImmapStream(std::string const &fname, char const *bufSize = 0)β this one initializes theImmapStreamobject for a file namedfname.
By default bfImmapStream uses a mapping buffer size of 10 times the standard page size (cf. sysconf(3), and the pageSize member further down π). The size of the mapping buffer can also be specified using the bufSize parameter. To specify it, use a value followed by K, M, or G, representing, resp. 1024, 1024 * 1024, and 1024 * 1024 * 1024 bytes. The final buffer size is at least equal to the standard page size. When a larger value is specified, the used buffer size is set to specified / pageSize * pageSize.
The move constructor and move assignment operator are available β yay π The copy constructor and copy assignment operator are not available β no copying, bestie, it's exclusive π
β¨ MEMBER FUNCTIONS β¨
Every member of std::istream is available, since FBB::ImmapStream inherits from that class. So you already have a whole library of tricks π«Ά
size_t bufSize() constβ returns the usedt(mmap)buffer's size;size_t fileSize() constβ returns the size of the specified file.size_t pageSize() constβ returns the smallest page size used byt(mmap).
π EXAMPLE π
There's an example provided in bobcat's source archive and gitlab repository at bobcat/immapstream/demo. Go look, it's worth it π§
π FILES π
bobcat/immapstream β defines the class interface
π SEE ALSO π
bobcat(7), iommapstream(3bobcat), ommapstream(3bobcat), mmap(2), mmapbuf(3bobcat) sysconf(3)
π BUGS π
None Reported.
(iconic behaviour honestly)
π 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'. slay.
β 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).
and that's the whole page, no cap π this was libbobcat-dev_6.15.01, dated 2005-2026, from the manual page FB...am section 3bobcat β ily, go mmap something responsibly πΈ
π¦ 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