zipios::BackBuffer(3)
π zipios::BackBuffer(3) π
okay bestie, welcome to the Library Functions Manual section for zipios::BackBuffer β this is a C++ library function page, and it's genuinely so useful, i promise. grab a boba, we're going in π§β¨
πΈ NAME πΈ
zipios::BackBuffer β so a BackBuffer instance is useful for reading the last part of a file in an efficient manner, when it is not known exactly how far back (towards the front!) to go, to find the start of the desired data block. literally the "idk how far back i need to look" queen π
β¨ SYNOPSIS β¨
#include <backbuffer.h>
Inherits vector< unsigned char >. yes bestie, it's a vector that inherited the whole lewk π
π Public Member Functions
BackBuffer(istream &is, VirtualSeeker vs=VirtualSeeker(), int chunk_size=1024)β BackBuffer constructor.int readChunk(int &read_pointer)β Reads another chunk and returns the size of the chunk that has been read.
π¦ Detailed Description π¦
A BackBuffer instance is useful for reading the last part of a file in an efficient manner, when it is not known exactly how far back (towards the front!) to go, to find the start of the desired data block.
BackBuffer is a vector< unsigned char > that fills itself with data from a file by reading chunks from the end of the file progressing towards the start. no cap, it goes backwards and it eats. Upon construction the BackBuffer instance is associated with a file and a chunksize can be specified. To read a chunk of the file into the BackBuffer call readChunk(). that's the whole vibe π«Ά
Definition at line 32 of file backbuffer.h.
π Constructor & Destructor Documentation π
zipios::BackBuffer::BackBuffer (istream & is, VirtualSeeker vs = VirtualSeeker(), int chunk_size = 1024) [inline], [explicit]
BackBuffer constructor. it's giving main character energy fr fr π
Parameters
isβ Theistreamto read the data from. The stream must be seekable, asBackBufferwill reposition the file position to read chunks from the back of the file.chunk_sizeβ specifies the size of the chunks to read the file into theBackBufferin.
Exceptions
FCollExceptionβ Thrown if theVirtualSeeker vsthat has been specified is invalid for theistream is.
heads up bestie: that stream has to be seekable, no negotiating, no exceptions (except the FCollException one lmaooo) π
Definition at line 61 of file backbuffer.h.
π₯ Member Function Documentation π₯
int zipios::BackBuffer::readChunk (int & read_pointer) [inline]
Reads another chunk and returns the size of the chunk that has been read. Returns 0 on I/O failure. so if u get a 0, that's the "it didn't work" signal, noted π
Parameters
read_pointerβ When a new chunk is read in, the already stored bytes change position in theBackBuffer.read_pointeris assumed byreadChunk()to be a pointer into a position in theBackBuffer, and is updated to point to the same position in the file as it pointed to before the new chunk was read. it literally follows your fave to wherever they moved to, iconic behavior π
Definition at line 75 of file backbuffer.h.
π Author π
Generated automatically by Doxygen for Zipios++ from the source code. (not a human, just a very diligent little robot π§)
and that's the whole page bestie!! this was Zipios++, version dated Tue Mar 24 2020, and you just read zipios::BackBuffer(3) π go read the last part of a file, you've earned it πΈβ¨π¦ππ
π¦ where this page comes from
- ubuntu jammy: libzipios++-dev 0.1.5.9+cvs.2007.04.28-11build1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms