<commit_before># HTTPRange

A library to parse an HTTP `Range` header with semantics similar to
[Heroku's Range headers][1].

 [1]: https://devcenter.heroku.com/articles/platform-api-reference#ranges

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'http_range'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install http_range

## Usage

```ruby
http_range = HTTPRange.parse('Range: id 29f99177-36e9-466c-baef-f855e1ab731e..29f99177-36e9-466c-baef-f855e1ab731e[; max=100')
<commit_msg>Update README with mention of SPEC<commit_after># HTTPRange

A library to parse an HTTP `Range` header for HTTP APIS with semantics
described in [SPEC][1].

 [1]: https://github.com/h3h/http_range/blob/master/SPEC.md

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'http_range'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install http_range

## Usage

```ruby
http_range = HTTPRange.parse('Range: id 29f99177-36e9-466c-baef-f855e1ab731e..29f99177-36e9-466c-baef-f855e1ab731e[; max=100')

{'fraction_non_alphanumeric': 0.12029384756657484, 'fraction_numerical': 0.08356290174471992, 'mean_word_length': 4.505050505050505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4751151', 'n_tokens_mistral': 476, 'n_tokens_neox': 400, 'n_words': 104}