This sub-namespace of ALib BitBuffer provides algorithms to compress integral arrays. Classes ac_v1::ArrayCompressor and ac_v1::HuffmanEncoder implement some data formats defined on bit-streams, which, in future versions of ALib, may be changed. With such future changes, theses classes will be published in a next enumerated namespace, parallel to this one.
This approach will allow software to read existing datasets from files (explicitly using older versions of the classes by selecting them via the namespace) and convert the data to the new binary format.
Type aliases alib::ArrayCompressor, alib::HuffmanEncoder and alib::HuffmanDecoder will always refer to the latest version.
Type Index: | |
class | ArrayCompressor |
class | HuffmanDecoder |
class | HuffmanEncoder |
Function Index: | |
template<typename TI > | |
void | readHuffman (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | readIncremental (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | readMinMax (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | readSparse (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | readUncompressed (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | readVerySparse (BitReader &br, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeHuffman (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeIncremental (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeMinMax (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeSparse (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeUncompressed (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
template<typename TI > | |
void | writeVerySparse (BitWriter &bw, ArrayCompressor::Array< TI > &data) |
void readHuffman | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed using class HuffmanDecoder.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 75 of file acalgos.inl.
void readIncremental | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed with writeIncremental.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 401 of file acalgos.inl.
void readMinMax | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed with method writeMinMax.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 157 of file acalgos.inl.
void readSparse | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed with method writeSparse.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 204 of file acalgos.inl.
void readUncompressed | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed using simply the mechanics provided with class BitWriter which tries to shorten integrals on writing.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 120 of file acalgos.inl.
void readVerySparse | ( | BitReader & | br, |
ArrayCompressor::Array< TI > & | data ) |
Reads data compressed with method writeVerySparse.
TI | The integral type of the array to read back. |
br | The bit reader to use. |
data | The array to read the data to. |
Definition at line 314 of file acalgos.inl.
void writeHuffman | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes data compressed using class HuffmanEncoder.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 25 of file acalgos.inl.
void writeIncremental | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes array data incrementally.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 350 of file acalgos.inl.
void writeMinMax | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes array data by writing only the difference to the minimum found value.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 132 of file acalgos.inl.
void writeSparse | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes array data assuming it is sparsely set.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 178 of file acalgos.inl.
void writeUncompressed | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes array data by simply using the mechanics provided with class BitWriter, which tries to shorten integrals on writing.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 106 of file acalgos.inl.
void writeVerySparse | ( | BitWriter & | bw, |
ArrayCompressor::Array< TI > & | data ) |
Writes array data assuming it is very sparsely set.
TI | The integral type of the array to write. |
bw | The bit writer to use. |
data | The array to read the data from. |
Definition at line 221 of file acalgos.inl.