<commit_before>gollectd
========

A go parser for the collectd binary protocol<commit_msg>Add more about the project<commit_after>gollectd
========

This is yet another implementation of a [collectd binary protocol](https://collectd.org/wiki/index.php/Binary_protocol) parser in [Go](http://golang.org/), heavenly inspired by [gocollectd](https://github.com/paulhammond/gocollectd).

Installation
------------

`go get github.com/kimor79/gollectd`

Usage
-----

```
import (
    collectd github.com/kimor79/gollectd
)

buffer := make([]byte, 1452)
n, _, err := socket.ReadFromUDP(buffer)
packets, err := collectd.Parse(buffer[:n])
```
{'fraction_non_alphanumeric': 0.1750788643533123, 'fraction_numerical': 0.012618296529968454, 'mean_word_length': 4.669642857142857, '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': '277901', 'n_tokens_mistral': 221, 'n_tokens_neox': 205, 'n_words': 47}