<commit_before>[![Build Status](https://travis-ci.org/aswaving/yenc.svg?branch=master)](https://travis-ci.org/aswaving/yenc)
[![Coveralls](https://img.shields.io/coveralls/aswaving/yenc.svg)](https://coveralls.io/github/aswaving/yenc)
[![Rust version]( https://img.shields.io/badge/rust-1.13+-blue.svg)]()
[![Documentation](https://docs.rs/yenc/badge.svg)](https://docs.rs/yenc)
[![Latest version](https://img.shields.io/crates/v/yenc.svg)](https://crates.io/crates/yenc)
[![All downloads](https://img.shields.io/crates/d/yenc.svg)](https://crates.io/crates/yenc)
[![Downloads of latest version](https://img.shields.io/crates/dv/yenc.svg)](https://crates.io/crates/yenc)
# yenc

Encodes bytes into yEnc text and decodes yEnc encoded text back to bytes.
Requires compiler version >= v1.17.0.

See [documentation](http://docs.rs/yenc).
For more information on yEnc see [Wikipedia](https://en.wikipedia.org/wiki/YEnc) and [yenc.org](http://www.yenc.org).

The public API is not yet stable.

## Example: encoding Cargo.toml

```
let input_filename = "Cargo.toml";
let mut input_file = std::fs::File::open(&input_filename).unwrap();
let encode_options = yenc::EncodeOptions::new()
    .parts(1)
    .line_length(128);
let mut output_file = std::fs::File::create("Cargo.toml.yenc").unwrap();

yenc::yencode_file(&mut input_file, 
                   input_filename, 
                   encode_options, 
                   &mut output_file)
    .unwrap();
```

results in a new file Cargo.toml.yenc

```
=ybegin line=128 size=302 name=Cargo.toml 
<yenc encoded data>
=======
<the encoded bytes>
=yend size=302 crc32=FB24333B
```
<commit_msg>Remove (invalid) example from readme<commit_after>[![Build Status](https://travis-ci.org/aswaving/yenc.svg?branch=master)](https://travis-ci.org/aswaving/yenc)
[![Coveralls](https://img.shields.io/coveralls/aswaving/yenc.svg)](https://coveralls.io/github/aswaving/yenc)
[![Rust version]( https://img.shields.io/badge/rust-1.13+-blue.svg)]()
[![Documentation](https://docs.rs/yenc/badge.svg)](https://docs.rs/yenc)
[![Latest version](https://img.shields.io/crates/v/yenc.svg)](https://crates.io/crates/yenc)
[![All downloads](https://img.shields.io/crates/d/yenc.svg)](https://crates.io/crates/yenc)
[![Downloads of latest version](https://img.shields.io/crates/dv/yenc.svg)](https://crates.io/crates/yenc)
# yenc

Encodes bytes into yEnc text and decodes yEnc encoded text back to bytes.
Requires compiler version >= v1.17.0.

See [documentation](http://docs.rs/yenc).
For more information on yEnc see [Wikipedia](https://en.wikipedia.org/wiki/YEnc) and [yenc.org](http://www.yenc.org).

The public API is not yet stable.
{'fraction_non_alphanumeric': 0.19517709118311982, 'fraction_numerical': 0.01281085154483798, 'mean_word_length': 4.566037735849057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1284208', 'n_tokens_mistral': 1028, 'n_tokens_neox': 975, 'n_words': 151}