<commit_before># ase
ASE decoder

Package for decoding ASE (Adobe Swatch Exchange) files into a struct.

The ASE specification can be found [here](http://www.selapa.net/swatches/colors/fileformats.php#adobe_ase).

Note: this was one of my first projects in Go as well as with binary decoding. It's in desperate need of a refactor. Will hopefully have time to make updates soon. 

# Install

`$ go get github.com/arolek/ase`

# Getting started

the ase package exposes a Decode method. You simply create a new ASE struct and pass a string to the Decode method of a local file location. For example:

```go
package main

import (
	"log"

	"github.com/arolek/ase"
)

func main() {
	filePath := "/path/to/test.ase"

	aseDecoder := ase.ASE{}
	if err := aseDecoder.Decode(filePath, false); err != nil {
		log.Println(err)
	}

	log.Printf("%+v\n", aseDecoder)
}

```

# todo

- clean up logs
- implement Encode (struct -> .ase file)
- implement JSON encoding
- update documentation
- implement tests<commit_msg>updated README.md examples<commit_after># ase
ASE decoder

Package for decoding ASE (Adobe Swatch Exchange) files into a struct.

The ASE specification can be found [here](http://www.selapa.net/swatches/colors/fileformats.php#adobe_ase).

Note: this was one of my first projects in Go as well as with binary decoding. It's in desperate need of a refactor. Will hopefully have time to make updates soon. 

# Install

`$ go get github.com/arolek/ase`

# Getting started

the ase package exposes a Decode method. You simply create a new ASE struct and pass a string to the Decode method of a local file location. For example:

```go
package main

import (
	"log"

	"github.com/arolek/ase"
)

func main() {
	//	open the file
	f, err := os.Open("/path/to/test.ase")
	if err != nil {
		log.Println(err)
	}

	//	decode can take in any io.Reader
	ase, err := ase.Decode(f, false)
	if err != nil {
		log.Println(err)
	}

	log.Printf("%+v\n", ase)
}

```

# todo

- clean up logs
- implement Encode (struct -> .ase file)
- implement JSON encoding
- update documentation
- implement tests
{'fraction_non_alphanumeric': 0.10571840461316674, 'fraction_numerical': 0.0, 'mean_word_length': 3.636971046770601, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '4163892', 'n_tokens_mistral': 710, 'n_tokens_neox': 680, 'n_words': 264}