zipheadio.h(3)

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

πŸ’– zipheadio.h(3) πŸ’–

okay bestie, welcome to the Library Functions Manual page for zipheadio.h β€” yes that's the (3) section, we're in library-functions land, and this one is entirely about shuffling bytes in and out of zip header structs. no cap. let's go πŸ¦‹


✨ NAME ✨

zipheadio.h β€” literally just that. the header file's name. that's it. that's the whole NAME section. iconic behaviour honestly πŸ’…


🌸 SYNOPSIS 🌸

first up, the includes you gotta drag in before anything works, bestie:

#include 'zipios++/zipios-config.h'
#include 'zipios++/meta-iostreams.h'
#include <string>
#include <vector>
#include 'zipios++/ziphead.h'
#include 'zipios++/zipios_defs.h'
#include 'zipios++/fcollexceptions.h'

πŸŽ€ Functions πŸŽ€

here's the whole squad of functions, no gatekeeping:

uint16 zipios::ztohs (unsigned char *buf)
uint32 zipios::ztohl (unsigned char *buf)
uint32 zipios::htozl (unsigned char *buf)
uint16 zipios::htozs (unsigned char *buf)
uint32 zipios::readUint32 (istream &is)
void zipios::writeUint32 (uint32 host_val, ostream &os)
uint16 zipios::readUint16 (istream &is)
void zipios::writeUint16 (uint16 host_val, ostream &os)
void zipios::readByteSeq (istream &is, string &con, int count)
void zipios::writeByteSeq (ostream &os, const string &con)
void zipios::readByteSeq (istream &is, unsigned char *buf, int count)
void zipios::writeByteSeq (ostream &os, const unsigned char *buf, int count)
void zipios::readByteSeq (istream &is, vector< unsigned char > &vec, int count)
void zipios::writeByteSeq (ostream &os, const vector< unsigned char > &vec)
istream & zipios::operator>> (istream &is, ZipLocalEntry &zlh)
istream & zipios::operator>> (istream &is, DataDescriptor &dd)
istream & zipios::operator>> (istream &is, ZipCDirEntry &zcdh)
ostream & zipios::operator<< (ostream &os, const ZipLocalEntry &zlh)
ostream & zipios::operator<< (ostream &os, const ZipCDirEntry &zcdh)
ostream & zipios::operator<< (ostream &os, const EndOfCentralDirectory &eocd)

like, look at all of them. the ztoh* / htoz* crew doing the endianness shuffle, the readUint32 / writeUint32 / readUint16 / writeUint16 crew doing the numbers, the readByteSeq / writeByteSeq crew (three overloads each for string, unsigned char * and vector< unsigned char > πŸ’€), and then the stream operators, which are the main characters β€” operator>> and operator<< reading and writing ZipLocalEntry, DataDescriptor, ZipCDirEntry and EndOfCentralDirectory. slay. πŸ”₯


πŸ‘‘ DETAILED DESCRIPTION πŸ‘‘

okay so the tea is this: zipheadio.h is the header file that defines I/O functions for the header structures defined in ziphead.h.

that's the whole vibe. the structs live in ziphead.h, and this file is where all the reading-and-writing-them-to-a-stream magic lives. they're a matched set, iykyk 🫢

Definition in file zipheadio.h.

🌈 AUTHOR 🌈

Generated automatically by Doxygen for Zipios++ from the source code.

so like... not a human author, a machine did this. doxygen really said "I got this one" and generated the whole thing straight from the source. respect. πŸ€–βœ¨


aaaand that's the page bestie!! πŸ’– this was Zipios++, and the version/date stamp on the bottom of this manual page is Tue Mar 24 2020 β€” so yeah, that's the whole thing, dated and sourced and ready for you. go read your zip headers, you absolute legend πŸŽ€πŸ’…πŸŒΈ

πŸ“¦ where this page comes from