<commit_before>package meta

// Application contains third party application specific data.
//
// ref: https://www.xiph.org/flac/format.html#metadata_block_application
type Application struct {
	// Registered application ID.
	//
	// ref: https://www.xiph.org/flac/id.html
	ID uint32
	// Application data.
	Data []byte
}

// parseApplication reads and parses the body of an Application metadata block.
func (block *Block) parseApplication() error {
	panic("not yet implemented.")
}<commit_msg>meta: Implement the parseApplication method of Block.<commit_after>package meta

import (
	"encoding/binary"
	"io/ioutil"
)

// Application contains third party application specific data.
//
// ref: https://www.xiph.org/flac/format.html#metadata_block_application
type Application struct {
	// Registered application ID.
	//
	// ref: https://www.xiph.org/flac/id.html
	ID uint32
	// Application data.
	Data []byte
}

// parseApplication reads and parses the body of an Application metadata block.
func (block *Block) parseApplication() error {
	app := new(Application)
	err := binary.Read(block.lr, binary.BigEndian, &app.ID)
	if err != nil {
		return err
	}
	app.Data, err = ioutil.ReadAll(block.lr)
	return err
}
{'fraction_non_alphanumeric': 0.12189054726368159, 'fraction_numerical': 0.003316749585406302, 'mean_word_length': 3.8669354838709675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '2838642', 'n_tokens_mistral': 376, 'n_tokens_neox': 372, 'n_words': 110}