zipios::BackBuffer(3)

πŸ“¦
version 0.1.5.9+cvs.2007.04.28 Β· 2 versions
, in ubuntu jammy

πŸ’– 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 β€” The istream to read the data from. The stream must be seekable, as BackBuffer will 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 the BackBuffer in.

Exceptions

  • FCollException β€” Thrown if the VirtualSeeker vs that has been specified is invalid for the istream 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 the BackBuffer. read_pointer is assumed by readChunk() to be a pointer into a position in the BackBuffer, 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