<commit_before># btrfs-libs

Collection of Java structures and libraries for interacting with the btrfs filesystem.

## Current features

* Read btrfs streams
  * Supports all commands
  * CRC32C verification

## CI status
[![Build Status](https://travis-ci.org/GMTA/btrfs-libs.svg?branch=master)](https://travis-ci.org/GMTA/btrfs-libs)
[![Dependency Status](https://www.versioneye.com/user/projects/58e8c684d6c98d004652f41a/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58e8c684d6c98d004652f41a)

## Example usage

### Reading a btrfs stream

```java
Path streamFile = Paths.get("/path/to/stream.dat");
try (InputStream is = Files.newInputStream(streamFile);
        BufferedInputStream bis = new BufferedInputStream(is);
        BtrfsStreamReader reader = new BtrfsStreamReader(bis)) {

    while (reader.hasNext()) {
        BtrfsStreamElement element = reader.next();
        System.out.println(element);
    }

} catch (IOException e) {
    e.printStackTrace();
}<commit_msg>README: Simplify example<commit_after># btrfs-libs

Collection of Java structures and libraries for interacting with the btrfs filesystem.

## Current features

* Read btrfs streams
  * Supports all commands
  * CRC32C verification

## CI status
[![Build Status](https://travis-ci.org/GMTA/btrfs-libs.svg?branch=master)](https://travis-ci.org/GMTA/btrfs-libs)
[![Dependency Status](https://www.versioneye.com/user/projects/58e8c684d6c98d004652f41a/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58e8c684d6c98d004652f41a)

## Example usage

### Reading a btrfs stream

```java
Path streamFile = Paths.get("/path/to/stream.dat");
try (InputStream is = new BufferedInputStream(Files.newInputStream(streamFile));
        BtrfsStreamReader reader = new BtrfsStreamReader(is)) {

    while (reader.hasNext()) {
        BtrfsStreamElement element = reader.next();
        System.out.println(element);
    }

} catch (IOException e) {
    e.printStackTrace();
}
{'fraction_non_alphanumeric': 0.13168516649848638, 'fraction_numerical': 0.03632694248234107, 'mean_word_length': 4.61756373937677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, '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': '6357524', 'n_tokens_mistral': 686, 'n_tokens_neox': 647, 'n_words': 123}