<commit_before>Just-in-Time Compilation for Berkeley Packet Filter
===================================================

PREREQUISITES
-------------

You need sljit (http://sljit.sourceforge.net/) and mk-configure
(http://sourceforge.net/projects/mk-configure/) to build bpfjit.

It is recommended to use pkgsrc and install devel/mk-configure.
The pkgsrc guide is available here http://www.netbsd.org/docs/pkgsrc/

The sljit code must be at revision r143 or newer.

	$ svn co https://sljit.svn.sourceforge.net/svnroot/sljit@r143 sljit

	$ tar cf sljit-r143.tar.gz sljit

BUILDING
--------

Extract sljit tarball to sljit/ subdirectory. Make sure you pass
--keep-old-files (-k) option to tar to keep Makefiles from bpfjit.

	$ cd sljit/

	$ tar zktf /path/to/sljit-r143.tar.gz

Then you can build bpfjit with this command

	$ mkcmake

and install:

	$ export DESTDIR=/path/of/your/choice

	$ env PREFIX=/ mkcmake install

TESTING
-------

	$ export LD_LIBRARY_PATH=${DESTDIR}/lib

	$ cd ${DESTDIR}

	$ ./bin/bpfjit_test

	$ echo $?

You should see zero exit status.<commit_msg>No ALL CAPS.<commit_after>Just-in-Time Compilation for Berkeley Packet Filter
===================================================

Prerequisites
-------------

You need sljit (http://sljit.sourceforge.net/) and mk-configure
(http://sourceforge.net/projects/mk-configure/) to build bpfjit.

It is recommended to use pkgsrc and install devel/mk-configure.
The pkgsrc guide is available here http://www.netbsd.org/docs/pkgsrc/

The sljit code must be at revision r143 or newer.

	$ svn co https://sljit.svn.sourceforge.net/svnroot/sljit@r143 sljit

	$ tar cf sljit-r143.tar.gz sljit

Building
--------

Extract sljit tarball to sljit/ subdirectory. Make sure you pass
--keep-old-files (-k) option to tar to keep Makefiles from bpfjit.

	$ cd sljit/

	$ tar zktf /path/to/sljit-r143.tar.gz

Then you can build bpfjit with this command

	$ mkcmake

and install:

	$ export DESTDIR=/path/of/your/choice

	$ env PREFIX=/ mkcmake install

Testing
-------

	$ export LD_LIBRARY_PATH=${DESTDIR}/lib

	$ cd ${DESTDIR}

	$ ./bin/bpfjit_test

	$ echo $?

You should see zero exit status.
{'fraction_non_alphanumeric': 0.16612377850162866, 'fraction_numerical': 0.011167985109353188, 'mean_word_length': 3.369918699186992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1135166', 'n_tokens_mistral': 816, 'n_tokens_neox': 741, 'n_words': 215}