#encoding #decoding

base_core_socialist_values

Encode and decode with BCSV (base core socialist values)

7 releases

0.3.4 Apr 15, 2019
0.3.3 Apr 14, 2019
0.2.0 Apr 13, 2019
0.1.0 Apr 13, 2019

#610 in Encoding


Used in bcsv

MIT license

12KB
273 lines

富强、民主、文明、和谐

自由、平等、公正、法治

爱国、敬业、诚信、友善

Let the evil man in the middle know WHAT WE BELIEVE IN :)

Build status License: MIT Crate version Rust Docs

Encoder

Implemented Write

// examples/encoder.rs
use base_core_socialist_values::Encoder;
use std::io::{self, stdout, stdin};

fn main() -> io::Result<()> {
    let mut reader = stdin();
    let mut writer = stdout();
    io::copy(&mut reader, &mut Encoder::new(&mut writer))?;
    Ok(())
}
cargo run --example encoder

run, enter and Ctrl D (there is buffer in stdout)

Decoder

Implemented Write

// examples/decoder.rs
use base_core_socialist_values::Decoder;
use std::io::{self, stdout, stdin};

fn main() -> io::Result<()> {
    let mut reader = stdin();
    let mut writer = stdout();
    io::copy(&mut reader, &mut Decoder::new(&mut writer))?;
    Ok(())
}
cargo run --example decoder

run, enter and Ctrl D (there is buffer in stdout)

Dependencies

~220KB

薴\