ook 0.1.2

encode and decode Brainfuck or Ook
Documentation
  • Coverage
  • 60%
    6 out of 10 items documented0 out of 8 items with examples
  • Size
  • Source code size: 18.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zinso

ook lib is for Brainfuck/Ook! Obfuscation/Encoding

This tool can run encode an decode text written in the Brainfuck and Ook! programming languages and return the output.

Crates.io Rust license

#[allow(warnings)]
fn main() {
    use ook::Ook::brainfuck_to_text;
    use ook::Ook::text_to_brainfuck;
    use ook::Ook::ook_to_text;
    use ook::Ook::text_to_short_ook;
    use ook::Ook::text_to_ook;
    
    let text = "demo";
    assert_eq!(&text_to_brainfuck(text),"++++++++++[->++++++++++<]>.+.++++++++.++.<");//encode text to brainfuck

    assert_eq!(&brainfuck_to_text(text_to_brainfuck(text)),"demo"); //decode text from brainfuck

    assert_eq!(&text_to_ook(text),"Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook! Ook. Ook? Ook! Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook? Ook. ");//encode text to ook

    assert_eq!(text_to_short_ook(text),"....................!?!!.?....................?.?!.?!...!.................!.....!.?.");//encode text to ook short
    
    assert_eq!(ook_to_text(text_to_ook(text)),"demo");//decode text from ook
}