<commit_before>avi.js
======

simple javascript AVI de-/encoder<commit_msg>First version of the README file.<commit_after>avi.js
===
simple javascript AVI de-/encoder
---

avi.js makes it possible to generate avi files in pure javascript. I try to keep the api as simple as possible.

API
---

	AVIJS()

AVIJS is the basic constructor. One avi file is one instance of AVIJS.

	AVIJS.prototype.settings

Settings is a object you can set which contains the following members:

* width
* height

	AVIJS.prototype.streams

An array of all streams in the avi.

	AVIJS.prototype.getBuffer()

Returns a Blob which contains the header information and all contained streams making it a full avi file.
This can be used with the HTML5 FileSaver API for example.

	AVIJS.Stream(fps, width, height)

An avi file consists of multiple streams. The library is currently not intended for multi-stream avis so you most likely have to instance this just once.

* fps is the frames per seconds of the video

The other values should be self-explanatory.

	AVIJS.Stream.prototype.addRGBAFrame(frame)

For every frame you want to play back you can call this method once.

* frame is an array consisting of width * height * 4 pixels. This is for example the format of the return value of getImageData of a 2d canvas.

{'fraction_non_alphanumeric': 0.05491105955143078, 'fraction_numerical': 0.002320185614849188, 'mean_word_length': 3.9015151515151514, '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': '1931993', 'n_tokens_mistral': 379, 'n_tokens_neox': 363, 'n_words': 189}