<commit_before>beencode
=========

Some java helper classes to deal with binary encoded data strings.
This class collection can be used to parse, alter and generate these beencoded strings.

To read a beencoded file:
======
```java
BNode<?> bi = null;
try (FileInputStream fstream = new FileInputStream(new File("test.dat"))) {
	bi = NodeFactory.parseByPrefix(fstream.read(), fstream);
}

// You can now work with the BNode Object
```

To write a beencoded file:
======
```java
List<BNode> list = new ArrayList<>();

list.add(new BInteger(42));
list.add(new BString("bar"));

BDict bd = new BDict();
BList bl = new BList(list);

bd.put(new BString("foo"), new BInteger(13));
bd.put(new BString("mylist"), bl);

try (FileOutputStream fos = new FileOutputStream(new File("test.dat"))) {
	bd.write(fos);
}
```

Valid data types and usage:
======
```java
// Strings:
BString mystring = new BString("this is an example");

// Integer:
BInteger myint = new BInteger(1337);

// Lists:
BList mylist = new BList();
BList mylist2 = new BList(new List<BNode<?>>);

// manipulate list:
mylist.getList().add(mystring);
mylist2.getList().remove(myint);

// Dictionaries: (comparable to java Map):
BDict mydict = new BDict();
BDict mydict2 = new BDict(new HashMap<BString, BNode<?>>);

// manipulate dict:
mydict.put(mystring, myint);
mydict.get(mylist);
```

Usage:
======
As usual, the JUnit Testcases act as examples.<commit_msg>Formatting changes in the github readme<commit_after>beencode
=========

Some java helper classes to deal with binary encoded data strings.
This class collection can be used to parse, alter and generate these beencoded strings.

To read a beencoded file:
=====
```java
BNode<?> bi = null;
try (FileInputStream fstream = new FileInputStream(new File("test.dat"))) {
	bi = NodeFactory.parseByPrefix(fstream.read(), fstream);
}

// You can now work with the BNode Object
```

To write a beencoded file:
=====
```java
List<BNode> list = new ArrayList<>();

list.add(new BInteger(42));
list.add(new BString("bar"));

BDict bd = new BDict();
BList bl = new BList(list);

bd.put(new BString("foo"), new BInteger(13));
bd.put(new BString("mylist"), bl);

try (FileOutputStream fos = new FileOutputStream(new File("test.dat"))) {
	bd.write(fos);
}
```

Valid data types and usage:
=====
```java
// Strings:
BString mystring = new BString("this is an example");

// Integer:
BInteger myint = new BInteger(1337);

// Lists:
BList mylist = new BList();
BList mylist2 = new BList(new List<BNode<?>>);

// manipulate list:
mylist.getList().add(mystring);
mylist2.getList().remove(myint);

// Dictionaries: (comparable to java Map):
BDict mydict = new BDict();
BDict mydict2 = new BDict(new HashMap<BString, BNode<?>>);

// manipulate dict:
mydict.put(mystring, myint);
mydict.get(mylist);
```

Usage:
=====
As usual, the JUnit Testcases act as examples.
{'fraction_non_alphanumeric': 0.16526610644257703, 'fraction_numerical': 0.007703081232492998, 'mean_word_length': 5.130901287553648, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3414213', 'n_tokens_mistral': 990, 'n_tokens_neox': 954, 'n_words': 304}