<commit_before># Building jpegasm

## Copy jpeg-9a to deps/:
```bash
$ cd jpeg-asm/
$ mkdir deps
$ cp /path-to/jpeg-9a ./deps
```

## Source 'emsdk_env.sh'
```bash
$ cd emsdk_portable/
$ source ./emsdk_env.sh
```

## AUTOMATICALLY
Build the `RELEASE` version:
```bash
$ npm run build
```
OR to build the `DEBUG` version:
```bash
$ npm run build-debug
```

## MANUALLY

### Build libjpeg with emscripten
```bash
$ cd jpeg-asm/
$ ./scripts/embuild.sh --lib=jpeg --purge
$ ./scripts/embuild.sh --lib=jpeg --configure
$ ./scripts/embuild.sh --lib=jpeg --make
```

### Build libjpegasm with emscripten
```bash
$ cd jpeg-asm/
$ ./scripts/embuild.sh --lib=jpegasm
```


To build the `DEBUG` version, add --debug to all 'embuild.sh' invocations.
<commit_msg>fixed readme<commit_after># Building jpegasm

## Copy jpeg-9a to deps/:
```bash
$ cd jpeg-asm/
$ mkdir deps
$ cp /path-to/jpeg-9a ./deps
```

## Source 'emsdk_env.sh'
```bash
$ cd emsdk_portable/
$ source ./emsdk_env.sh
```

## Invoke `npm run build-*` commands:
Building the `RELEASE` version:
```bash
$ npm run build
```

OR 

to build the `DEBUG` version:
```bash
$ npm run build-debug
```

### `npm run build-*` invokes the following commands:

#### Building libjpeg with emscripten
```bash
$ cd jpeg-asm/
$ ./scripts/embuild.sh --lib=jpeg --purge
$ ./scripts/embuild.sh --lib=jpeg --configure
$ ./scripts/embuild.sh --lib=jpeg --make
```

#### Building libjpegasm with emscripten
```bash
$ cd jpeg-asm/
$ ./scripts/embuild.sh --lib=jpegasm
```

Add --debug to all 'embuild.sh' invocations to build the `DEBUG` version.

{'fraction_non_alphanumeric': 0.18424396442185514, 'fraction_numerical': 0.0025412960609911056, 'mean_word_length': 3.552023121387283, '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': '2710551', 'n_tokens_mistral': 651, 'n_tokens_neox': 584, 'n_words': 167}