<commit_before>lz4
====

This repository contains binding for lz4 compression library (https://github.com/Cyan4973/lz4).

LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, with near-linear scalability for multi-threaded applications. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

[![Build Status](https://travis-ci.org/bozaro/lz4-rs.svg?branch=master)](https://travis-ci.org/bozaro/lz4-rs)
[![Crates.io](https://img.shields.io/crates/v/lz4.svg)](https://crates.io/crates/lz4)

Rustdoc: https://bozaro.github.io/lz4-rs/lz4/

## Usage

Put this in your `Cargo.toml`:

```toml
[dependencies]
lz4 = "*"
```

And this in your crate root:

```rust
extern crate lz4;
```

Sample code for compression/decompression:
```rust
extern crate lz4;

use std::iter::FromIterator;
use std::env;<commit_msg>Added Gitter badge<commit_after>lz4
====

[![Join the chat at https://gitter.im/bozaro/lz4-rs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bozaro/lz4-rs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This repository contains binding for lz4 compression library (https://github.com/Cyan4973/lz4).

LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, with near-linear scalability for multi-threaded applications. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

[![Build Status](https://travis-ci.org/bozaro/lz4-rs.svg?branch=master)](https://travis-ci.org/bozaro/lz4-rs)
[![Crates.io](https://img.shields.io/crates/v/lz4.svg)](https://crates.io/crates/lz4)

Rustdoc: https://bozaro.github.io/lz4-rs/lz4/

## Usage

Put this in your `Cargo.toml`:

```toml
[dependencies]
lz4 = "*"
```

And this in your crate root:

```rust
extern crate lz4;
```

Sample code for compression/decompression:
```rust
extern crate lz4;

use std::iter::FromIterator;
use std::env;
{'fraction_non_alphanumeric': 0.14416146083613648, 'fraction_numerical': 0.02114368092263335, 'mean_word_length': 5.0523255813953485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 15, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3763566', 'n_tokens_mistral': 781, 'n_tokens_neox': 741, 'n_words': 186}