#include <BWTencoder.h>

Public Member Functions | |
| BWTencoder (uint_t mode, Stream *stream, bool owner=true, uint_t blockSize=K(256)) | |
| Constructor. | |
| virtual uint_t | decode (byte_t *block, uint_t num) |
| Decode data from the associated stream. | |
| virtual uint_t | encode (const byte_t *block, uint_t num) |
| Encode data to the associated stream. | |
| void | start (uint_t mode, Stream *stream, bool owner=true, uint_t blockSize=K(256)) |
| Initialize for encoding or decoding. | |
Protected Member Functions | |
| virtual void | clear () |
| Revert to initial state. | |
| virtual void | finishEncoding () |
| Perform any necessary clean-up when encoding is finished. | |
BWTencoder is a block-sorting, lossless data compressor based on the Burrows-Wheeler Transform (BWT). bzip2 by Julian Seward is currently the most popular compressor based on the BWT. I have stolen some ideas (and even code!) from bzip2, and I've made it clear (with code comments) where I've done so. In fact, I have to admit that this implementation contains no original ideas or insights of my own. My goal here isn't research - I leave that to those who are best-suited for it. I've tried to provide a solid implementation that is:
Attributes
M. Burrows and D. J. Wheeler "A block-sorting lossless data compression algorithm" SRC Research Report 124
Links
Definition at line 76 of file BWTencoder.h.
| utl::BWTencoder::BWTencoder | ( | uint_t | mode, | |
| Stream * | stream, | |||
| bool | owner = true, |
|||
| uint_t | blockSize = K(256) | |||
| ) | [inline] |
Constructor.
| mode | io_rd to encode, io_wr to decode (see io_t) | |
| stream | (optional) associated stream | |
| owner | (optional : true) owner flag for stream | |
| blockSize | (optional : 256 KB) block size |
Definition at line 87 of file BWTencoder.h.
References utl::init().
Decode data from the associated stream.
| block | block to decode into | |
| num | size of block |
Implements utl::Encoder.
Encode data to the associated stream.
| block | block to encode | |
| num | size of block |
Implements utl::Encoder.
| void utl::BWTencoder::start | ( | uint_t | mode, | |
| Stream * | stream, | |||
| bool | owner = true, |
|||
| uint_t | blockSize = K(256) | |||
| ) |
Initialize for encoding or decoding.
| mode | io_rd to encode, io_wr to decode (see io_t) | |
| stream | (optional) associated stream | |
| owner | (optional : true) owner flag for stream | |
| blockSize | (optional : 256 KB) block size |
| virtual void utl::BWTencoder::clear | ( | ) | [protected, virtual] |
| virtual void utl::BWTencoder::finishEncoding | ( | ) | [protected, virtual] |
1.5.6