<commit_before># Exify Office
A simple Bash wrapper for EXIficient and EXIProcessor to compress Office Open XML documents using Efficient XML Interchange.

## Quickstart Guide

__With Subversion__

Checkout local copy:

```
$ svn checkout https://github.com/hillbw/exify-office
```

Change into project directory:

```
$ cd exify-office
```

Compress the included sample file:

This will create a file called schedule.xlse ('e' for Efficient) in the same directory as the given xls file.

```
$ ./exify_office.sh samples/schedule.xlsx
```

Decompress

This creates a file called hello_unexify.docx, again in the samples directory.

```
$ ./unexify_office.sh samples/schedule.xlse
```

## Notes

The scripts use the following conversions for filename extensions:

| Original Extension | Exified Extension |
|--------------------|-------------------|
| `.docx`            | `.doce`           |
| `.pptx`            | `.ppte`           |
| `.xlsx`            | `.xlse`           |

Even for the trivial `hello.docx` file, the roundtrip conversion may decrease the filesize. Generally, this is because when EXIficient writes EXI out to XML, it will condense empty elements to singleton notations. Office appears to use the expanded open-tag/close-tag notation in all cases.

```xml
<!-- Original .docx format -->
<dc:description></dc:description>

<!-- After roundtrip conversion -->
<dc:description/>
```<commit_msg>Edits to readme file.<commit_after># Exify Office
A simple Bash wrapper for [EXIficient](http://sourceforge.net/projects/exificient/) and [EXIProcessor](http://sourceforge.net/projects/exiprocessor/) to compress Office Open XML documents using [Efficient XML Interchange](http://www.w3.org/TR/2014/REC-exi-20140211/).

## Quickstart Guide

### Checkout

```
$ svn checkout https://github.com/hillbw/exify-office
```

### Change into project directory

```
$ cd exify-office
```

### Compress the included sample file:

This will create a file called schedule.xlse ('e' for Efficient) in the same directory as the given xls file.

```
$ ./exify_office.sh samples/schedule.xlsx
```

### Decompress

This creates a file called hello_unexify.docx, again in the samples directory.

```
$ ./unexify_office.sh samples/schedule.xlse
```

## Notes

The scripts use the following conversions for filename extensions:

| Original Extension | Exified Extension |
|--------------------|-------------------|
| `.docx`            | `.doce`           |
| `.pptx`            | `.ppte`           |
| `.xlsx`            | `.xlse`           |

After a roundtrip conversion, the resulting Office file may be smaller than the original. Generally, this is because when EXIficient writes EXI out to XML, it will condense empty elements to singleton notations. Office appears to use the expanded open-tag/close-tag notation in all cases.

```xml
<!-- Original .docx format -->
<dc:description></dc:description>

<!-- After roundtrip conversion -->
<dc:description/>
```
{'fraction_non_alphanumeric': 0.13966858302333446, 'fraction_numerical': 0.00439634764964491, 'mean_word_length': 3.1197771587743732, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 2}, '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': '1286714', 'n_tokens_mistral': 897, 'n_tokens_neox': 832, 'n_words': 298}