Function nucleic_acid::bwt
[−]
[src]
pub fn bwt(input: &[u8]) -> Vec<u8>
Generate the Burrows-Wheeler Transform of the given input.
let text = String::from("The quick brown fox jumps over the lazy dog"); let bw = nucleic_acid::bwt(text.as_bytes()); assert_eq!(String::from("gkynxeser\u{0}l i hhv otTu c uwd rfm ebp qjoooza"), String::from_utf8(bw).unwrap());
The output can then be used for compression or FM-index'ing.