JS8Call-Improved master
Loading...
Searching...
No Matches
JSC Class Reference
Collaboration diagram for JSC:

Static Public Member Functions

static Codeword codeword (quint32 index, bool separate, quint32 bytesize, quint32 s, quint32 c)
 Generates a codeword for the given index and parameters.
static QList< CodewordPair > compress (QString text)
 Compresses the given text into a list of codeword pairs.
static QString decompress (Codeword const &bits)
 Decompresses the given bit vector into a string.
static bool exists (QString w, quint32 *pIndex)
 Checks if the given word exists in the compression map.
static quint32 lookup (QString w, bool *ok)
 Looks up the index of the given word in the compression map.
static quint32 lookup (char const *b, bool *ok)
 Looks up the index of the given C-style string in the compression map.

Static Public Attributes

static const quint32 size = 262144
static const Tuple map [262144]
static const Tuple list [262144]
static const quint32 prefixSize = 103
static const Tuple prefix [103]

Member Function Documentation

◆ codeword()

Codeword JSC::codeword ( quint32 index,
bool separate,
quint32 bytesize,
quint32 s,
quint32 c )
static

Generates a codeword for the given index and parameters.

Parameters
index
separate
bytesize
s
c
Returns
Codeword
Here is the caller graph for this function:

◆ compress()

QList< CodewordPair > JSC::compress ( QString text)
static

Compresses the given text into a list of codeword pairs.

Parameters
text
Returns
QList<CodewordPair>
Here is the call graph for this function:

◆ decompress()

QString JSC::decompress ( Codeword const & bitvec)
static

Decompresses the given bit vector into a string.

Parameters
bitvec
Returns
QString

◆ exists()

bool JSC::exists ( QString w,
quint32 * pIndex )
static

Checks if the given word exists in the compression map.

Parameters
w
pIndex
Returns
true
false
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup() [1/2]

quint32 JSC::lookup ( char const * b,
bool * ok )
static

Looks up the index of the given C-style string in the compression map.

Parameters
b
ok
Returns
quint32

◆ lookup() [2/2]

quint32 JSC::lookup ( QString w,
bool * ok )
static

Looks up the index of the given word in the compression map.

Parameters
w
ok
Returns
quint32
Here is the call graph for this function:
Here is the caller graph for this function:

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