<commit_before># ffi-msgpack

* [github.com/postmodern/ffi-msgpack](http://github.com/postmodern/ffi-msgpack/)
* [github.com/postmodern/ffi-msgpack/issues](http://github.com/postmodern/ffi-msgpack/issues)
* Postmodern (postmodern.mod3 at gmail.com)

## Description

Ruby FFI bindings for the [msgpack](http://msgpack.sourceforge.net/) library.

## Features

## Examples

Pack an Object:

    require 'ffi/msgpack'

    FFI::MsgPack.pack([1,'x',true])
    # => "\x93\x01\xA1x\xC3"

Pack one or more Objects into a Buffer:

    packer = FFI::MsgPack::Packer.create
    packer << 1
    packer << 'x'
    packer << true
<commit_msg>Added items to the Features section.<commit_after># ffi-msgpack

* [github.com/postmodern/ffi-msgpack](http://github.com/postmodern/ffi-msgpack/)
* [github.com/postmodern/ffi-msgpack/issues](http://github.com/postmodern/ffi-msgpack/issues)
* Postmodern (postmodern.mod3 at gmail.com)

## Description

Ruby FFI bindings for the [msgpack](http://msgpack.sourceforge.net/) library.

## Features

* Can pack and unpack `nil`, `true`, `false`, Integers, Floats, Strings,
  Arrays and Hashes.
* Provides a buffered / callback driven packer.
* Provides a buffered / streaming driven unpacker.

## Examples

Pack an Object:

    require 'ffi/msgpack'

    FFI::MsgPack.pack([1,'x',true])
    # => "\x93\x01\xA1x\xC3"

Pack one or more Objects into a Buffer:

    packer = FFI::MsgPack::Packer.create
    packer << 1
    packer << 'x'
    packer << true

{'fraction_non_alphanumeric': 0.1513917175831636, 'fraction_numerical': 0.012219959266802444, 'mean_word_length': 3.8327868852459015, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, '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': '1579930', 'n_tokens_mistral': 562, 'n_tokens_neox': 522, 'n_words': 112}