<commit_before>= lz4-ruby

Ruby bindings for {LZ4}[http://code.google.com/p/lz4/].

== Installation

    gem install lz4-ruby

== Usage

    require 'rubygems'
    require 'lz4-ruby'

    # compress (fast)
    compressed = LZ4::compress("hello, world")

    # compress (high compression)
    compressed = LZ4::compressHC("hello, world")

    # uncompress
    uncompressed = LZ4::uncompress(compressed)

== Benchmark

Tested on VirtualBox VM : 2-core / 4GB RAM (Host : Core i5-2520M / 8GB RAM).

=== {enwik8}[http://mattmahoney.net/dc/enwik8.zip]
    method  ratio(bpc)      comp.time(ms)   uncomp.time(ms)
    -------------------------------------------------------
    lz4     4.559           519.25          182.67
    snappy  4.668           1050.73         257.94
    lzo     4.279           1000.13         574.77

== TODO

* Write API documents.
* Support mswin32 platform.
<commit_msg>support windows (mingw32)<commit_after>= lz4-ruby

Ruby bindings for {LZ4}[http://code.google.com/p/lz4/].

== Installation

    gem install lz4-ruby

== Usage

    require 'rubygems'
    require 'lz4-ruby'

    # compress (fast)
    compressed = LZ4::compress("hello, world")

    # compress (high compression)
    compressed = LZ4::compressHC("hello, world")

    # uncompress
    uncompressed = LZ4::uncompress(compressed)

== Benchmark

Tested on VirtualBox VM : 2-core / 4GB RAM (Host : Core i5-2520M / 8GB RAM).

=== {enwik8}[http://mattmahoney.net/dc/enwik8.zip]
    method  ratio(bpc)      comp.time(ms)   uncomp.time(ms)
    -------------------------------------------------------
    lz4     4.559           519.25          182.67
    snappy  4.668           1050.73         257.94
    lzo     4.279           1000.13         574.77

== TODO

* Write API documents.

{'fraction_non_alphanumeric': 0.17986425339366516, 'fraction_numerical': 0.07352941176470588, 'mean_word_length': 1.8168789808917198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3038930', 'n_tokens_mistral': 688, 'n_tokens_neox': 598, 'n_words': 131}