91#ifndef __ADS_BurrowsWheeler
92 #define __ADS_BurrowsWheeler
113#include <string_view>
154inline constexpr std::size_t
bwtWideFrom = ( std::size_t( 1 ) << 31 ) - 1;
161[[nodiscard]]
inline BWT bwt( std::string_view s ,
183[[nodiscard]]
inline std::vector< std::size_t >
lfMapping(
const BWT & b );
222[[nodiscard]]
inline std::vector< std::uint8_t >
235[[nodiscard]]
inline std::vector< std::uint8_t >
254[[nodiscard]]
inline std::string
256 std::string_view alphabet );
268[[nodiscard]]
inline std::string
288[[nodiscard]]
inline std::vector< std::pair< std::size_t , char > >
304[[nodiscard]]
inline std::string
331[[nodiscard]]
inline std::vector< std::uint32_t >
354[[nodiscard]]
inline std::vector< std::uint8_t >
380[[nodiscard]]
inline std::vector< std::uint8_t >
402[[nodiscard]]
inline std::string
413#include "ADS/compression/impl/BurrowsWheeler.tpp"
The canonical code of Huffman (chapter 12, Statistical Coding, of Ferragina's book): the lengths of ...
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The bits of the compressors of this folder, packed in bytes, since their input and their output are s...
The suffix array of a text of symbols, beyond the book: is the starting place of the -th smallest ...
The engineered construction of the suffix array and of its LCP array, beyond the book: the ones that ...
std::vector< std::size_t > lfMapping(const BWT &b)
the LF-mapping of the rows of the transform
BWT bwt(std::string_view s, std::size_t wideFrom=bwtWideFrom)
std::string inverseBwt(const BWT &b)
the text of the transform
std::string bzipDecompress(std::span< const std::uint8_t > code)
the text of a bzip
std::vector< std::uint32_t > zeroRunEncode(const std::vector< std::uint8_t > &x)
the RLE0 of bzip: the integers of but 0 grown by 1, each run of zeros in the code of Wheeler,...
std::string inverseMoveToFront(const std::vector< std::uint8_t > &x, std::string_view alphabet)
the symbols of the places in the list alphabet
std::vector< std::uint8_t > moveToFront(std::string_view s, std::string_view alphabet)
the places of the symbols of in the list alphabet, each moved to the front after its use
std::vector< std::uint8_t > bzipCompress(std::string_view s, std::size_t block=900000)
the bzip of : blocks of at most block symbols, each transformed, moved to front, coded by RLE0 and by...
constexpr std::size_t bwtWideFrom
the transform of
Definition BurrowsWheeler.h:154
std::vector< std::uint8_t > zeroRunDecode(const std::vector< std::uint32_t > &y)
the integers of an RLE0
std::vector< std::pair< std::size_t, char > > runLengthEncode(std::string_view s)
the maximal runs of as pairs of a length and a symbol
std::string runLengthDecode(const std::vector< std::pair< std::size_t, char > > &R)
the text of the runs
the transform of Burrows and Wheeler: the last column of without the , and the row of the
Definition BurrowsWheeler.h:127
std::size_t primary
the row of the in
Definition BurrowsWheeler.h:129
friend bool operator==(const BWT &a, const BWT &b)=default
whether the two transforms have the same column and row
std::string last
the last column without the
Definition BurrowsWheeler.h:128