QByteArray(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QByteArray β€” the 3qt manual, but make it make sense πŸ’–

okay bestie, gather round, because we're about to get intimate with an array of bytes. this is the QByteArray(3qt) page and honestly? it's short. it's sweet. it's giving "low-level but make it cute". let's go. ✨


🌸 NAME 🌸

QByteArray β€” Array of bytes. that's it. that's the whole name. no notes. πŸ’…


✨ SYNOPSIS ✨

first thing first, the iconic disclaimer:

All the functions in this class are reentrant when Qt is built with thread support.</p>

(yes, the stray </p> is literally in the source. we don't fix it. we respect it. it's part of the lore. 🫢)

#include <qcstring.h>

Inherits QMemArray<char>.

Inherited by QBitArray and QCString. the family tree is thriving. 🌳

πŸ‘‘ Public Members

QByteArray ()
QByteArray ( int size )

QByteArray qCompress ( const QByteArray & data )
QByteArray qCompress ( const uchar * data, int nbytes )
QByteArray qUncompress ( const QByteArray & data )
QByteArray qUncompress ( const uchar * data, int nbytes )

squish and unsquish. the whole squad is here. 😌


πŸ’œ DESCRIPTION πŸ’œ

so. the QByteArray class provides an array of bytes. literally what it says on the tin, no cap.

more specifically? it's an explicitly shared array of bytes, and it's lowkey perfect for manipulating memory areas with custom data. the way it does this is by being implemented as a QMemArray<char> β€” so if you want the full tea, go read the QMemArray documentation, because that's where the real details live. πŸ“

See also: Collection Classes and Non-GUI Classes. iykyk. πŸ’«


πŸŽ€ MEMBER FUNCTION DOCUMENTATION πŸŽ€

QByteArray::QByteArray ()

Constructs an empty QByteArray. blank slate. main character at the start of her arc. 🌱

QByteArray::QByteArray ( int size )

Constructs a QByteArray of size size. that's the argument. that's the vibe. πŸ“


QByteArray qCompress ( const QByteArray & data )

Compresses the array data and hands you back the compressed byte array, using zlib. tiny data, big energy. πŸ”₯

See also: qUncompress().

QByteArray qCompress ( const uchar * data, int nbytes )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Compresses the array data which is nbytes long and returns the compressed byte array. same energy, different entry point. ✨

QByteArray qUncompress ( const QByteArray & data )

Uncompresses the array data and returns the uncompressed byte array.

heads up bestie: it returns an empty QByteArray if the input data was corrupt. so if you get nothing back, that might be why. 😭

See also: qCompress().

QByteArray qUncompress ( const uchar * data, int nbytes )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Uncompresses the array data which is nbytes long and returns the uncompressed byte array. πŸ¦‹


🌈 SEE ALSO 🌈

go forth and read, bestie. πŸ“š


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


🌸 AUTHOR 🌸

Generated automatically from the source code. (no human author to stan, only the machine. iconic of it honestly. πŸ€–βœ¨)


πŸ’€ BUGS πŸ’€

If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. 🫢 (yes they really say thank you. polite queens.)

The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. (we're the unofficial remix. the bootleg. the mixtape. 🎧)

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qbytearray.3qt) and the Qt version (3.3.8).


okay and that's the whole page!! it's from Trolltech AS, dated 2 February 2007, and it's the QByteArray(3qt) manual β€” version 3.3.8 of Qt, if you were wondering. love that for us. bye bestie, go compress something. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from