Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
HPack::BitIStream Class Reference

#include <bitstreams_p.h>

+ Collaboration diagram for HPack::BitIStream:

Public Types

enum class  Error { NoError , NotEnoughData , CompressionError , InvalidInteger }
 

Public Member Functions

 BitIStream ()
 
 BitIStream (const uchar *f, const uchar *l)
 
quint64 bitLength () const
 
bool hasMoreBits () const
 
template<class T >
quint64 peekBits (quint64 from, quint64 length, T *dstPtr) const
 
quint64 streamOffset () const
 
bool skipBits (quint64 nBits)
 
bool rewindOffset (quint64 nBits)
 
bool read (quint32 *dstPtr)
 
bool read (QByteArray *dstPtr)
 
Error error () const
 

Detailed Description

Definition at line 62 of file bitstreams_p.h.

Member Enumeration Documentation

◆ Error

enum class HPack::BitIStream::Error
strong
Enumerator
NoError 
NotEnoughData 
CompressionError 
InvalidInteger 

Definition at line 71 of file bitstreams_p.h.

Constructor & Destructor Documentation

◆ BitIStream() [1/2]

HPack::BitIStream::BitIStream ( )

Definition at line 114 of file bitstreams.cpp.

◆ BitIStream() [2/2]

HPack::BitIStream::BitIStream ( const uchar * f,
const uchar * l )

Definition at line 122 of file bitstreams.cpp.

Member Function Documentation

◆ bitLength()

quint64 HPack::BitIStream::bitLength ( ) const

Definition at line 130 of file bitstreams.cpp.

Referenced by HPack::Decoder::decodeHeaderFields(), hasMoreBits(), read(), read(), and skipBits().

+ Here is the caller graph for this function:

◆ error()

BitIStream::Error HPack::BitIStream::error ( ) const

Definition at line 288 of file bitstreams.cpp.

◆ hasMoreBits()

bool HPack::BitIStream::hasMoreBits ( ) const

Definition at line 135 of file bitstreams.cpp.

References bitLength().

Referenced by HPack::HuffmanDecoder::decodeStream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ peekBits()

template<class T >
quint64 HPack::BitIStream::peekBits ( quint64 from,
quint64 length,
T * dstPtr ) const
inline

Definition at line 93 of file bitstreams_p.h.

References Q_ASSERT.

Referenced by HPack::HuffmanDecoder::decodeStream(), and read().

+ Here is the caller graph for this function:

◆ read() [1/2]

bool HPack::BitIStream::read ( QByteArray * dstPtr)

Definition at line 238 of file bitstreams.cpp.

References bitLength(), compressed, CompressionError, HPack::huffman_decode_string(), NoError, NotEnoughData, peekBits(), Q_ASSERT, QByteArray(), read(), and skipBits().

+ Here is the call graph for this function:

◆ read() [2/2]

bool HPack::BitIStream::read ( quint32 * dstPtr)

Definition at line 158 of file bitstreams.cpp.

References bitLength(), InvalidInteger, NoError, NotEnoughData, Q_ASSERT, and qCritical.

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rewindOffset()

bool HPack::BitIStream::rewindOffset ( quint64 nBits)

Definition at line 149 of file bitstreams.cpp.

◆ skipBits()

bool HPack::BitIStream::skipBits ( quint64 nBits)

Definition at line 140 of file bitstreams.cpp.

References bitLength().

Referenced by HPack::HuffmanDecoder::decodeStream(), and read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ streamOffset()

quint64 HPack::BitIStream::streamOffset ( ) const
inline

Definition at line 123 of file bitstreams_p.h.

Referenced by HPack::Decoder::decodeHeaderFields(), and HPack::HuffmanDecoder::decodeStream().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: