<commit_before># s2prot

[![Build Status](https://travis-ci.org/icza/s2prot.svg?branch=master)](https://travis-ci.org/icza/s2prot)
[![GoDoc](https://godoc.org/github.com/icza/s2prot?status.svg)](https://godoc.org/github.com/icza/s2prot)
[![Go Report Card](https://goreportcard.com/badge/github.com/icza/s2prot)](https://goreportcard.com/report/github.com/icza/s2prot)
[![codecov](https://codecov.io/gh/icza/s2prot/branch/master/graph/badge.svg)](https://codecov.io/gh/icza/s2prot)

Package `s2prot` is a decoder/parser of Blizzard's StarCraft II replay file format (*.SC2Replay).

`s2prot` processes the "raw" data that can be decoded from replay files using an MPQ parser
such as [github.com/icza/mpq](https://github.com/icza/mpq).

The package is designed to be used by other packages or apps, and is safe for concurrent use.
There is also an example CLI app that can be used standalone.

_Check out the sister project to parse StarCraft: Brood War replays: [screp](https://github.com/icza/screp)_

## Using the `s2prot` CLI app<commit_msg>Improved README.<commit_after># s2prot

[![Build Status](https://travis-ci.org/icza/s2prot.svg?branch=master)](https://travis-ci.org/icza/s2prot)
[![GoDoc](https://godoc.org/github.com/icza/s2prot?status.svg)](https://godoc.org/github.com/icza/s2prot)
[![Go Report Card](https://goreportcard.com/badge/github.com/icza/s2prot)](https://goreportcard.com/report/github.com/icza/s2prot)
[![codecov](https://codecov.io/gh/icza/s2prot/branch/master/graph/badge.svg)](https://codecov.io/gh/icza/s2prot)

Package `s2prot` is a decoder/parser of Blizzard's StarCraft II replay file format (*.SC2Replay).

`s2prot` processes the "raw" data that can be decoded from replay files using an MPQ parser
such as [github.com/icza/mpq](https://github.com/icza/mpq).

The package is designed to be used by other packages or apps, and is safe for concurrent use.
There is also an example CLI app that can be used standalone.

Parses all versions that were written with retail versions of StarCraft II (and some beta versions too).

_Check out the sister project to parse StarCraft: Brood War replays: [screp](https://github.com/icza/screp)_

## Using the `s2prot` CLI app
{'fraction_non_alphanumeric': 0.1459188326493388, 'fraction_numerical': 0.011855905152758778, 'mean_word_length': 4.92972972972973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 20, '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': '2780701', 'n_tokens_mistral': 797, 'n_tokens_neox': 771, 'n_words': 193}