[−][src]Module compress::bwt::dc
DC (Distance Coding) forward and backward transformation. Designed to be used on BWT block output for compression.
Links
http://www.data-compression.info/Algorithms/DC/
Example
use compress::bwt::dc; let bytes = b"abracadabra"; let distances = dc::encode_simple::<usize>(bytes); let decoded = dc::decode_simple(bytes.len(), &distances[..]);
Credit
This is an original implementation. Thanks to Edgar Binder for inventing DC!
Structs
Context | Distance coding context Has all the information potentially needed by the underlying coding model |
EncodeIterator | DC body iterator, can be used to encode distances |
Constants
TOTAL_SYMBOLS |
Functions
decode | Decode a block of distances given the initial symbol positions |
decode_simple | Decode version with "batteries included" for quick testing |
encode | Encode a block of bytes 'input' write output distance stream into 'distances' return: unique bytes encountered in the order they appear with the corresponding initial distances |
encode_simple | Encode version with "batteries included" for quick testing |
Type Definitions
Rank | |
Symbol |