<commit_before>rust-rocksdb
============

### running
- Cargo.toml
```rust
[dependencies.rocksdb]
git = "https://github.com/spacejam/rust-rocksdb"
```
RocksDB 3.8.1 will be pulled in and compiled automatically.
- Code
```rust
extern crate rocksdb;

fn main() {
  match rocksdb::create_or_open("/path/for/rocksdb/storage".to_string()) {
    Ok(db) => {
      db.put(b"my key", b"my value");

      db.get(b"my key").map( |value| {
        match value.to_utf8() {
          Some(v) =>
            println!("retrieved utf8 value {}", v),
          None =>
            println!("did not read valid utf-8 out of the db"),
        }
      })
        .on_absent( || { println!("value not found") })
        .on_error( |e| { println!("error retrieving value: {}", e) });

      db.delete(b"my key");

      db.close();<commit_msg>formatting<commit_after>rust-rocksdb
============

### running
###### Cargo.toml
```rust
[dependencies.rocksdb]
git = "https://github.com/spacejam/rust-rocksdb"
```
RocksDB 3.8.1 will be pulled in and compiled automatically.
###### Code
```rust
extern crate rocksdb;

fn main() {
  match rocksdb::create_or_open("/path/for/rocksdb/storage".to_string()) {
    Ok(db) => {
      db.put(b"my key", b"my value");

      db.get(b"my key").map( |value| {
        match value.to_utf8() {
          Some(v) =>
            println!("retrieved utf8 value {}", v),
          None =>
            println!("did not read valid utf-8 out of the db"),
        }
      })
        .on_absent( || { println!("value not found") })
        .on_error( |e| { println!("error retrieving value: {}", e) });

      db.delete(b"my key");

      db.close();
{'fraction_non_alphanumeric': 0.19624470018170806, 'fraction_numerical': 0.0072683222289521504, 'mean_word_length': 2.599128540305011, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2906007', 'n_tokens_mistral': 580, 'n_tokens_neox': 561, 'n_words': 125}