<commit_before>/*
Package vlq implements a library for handling variable-length quantity (vlq)
values specified by the MIDI file format.

See: https://www.midi.org/images/downloads/complete_midi_96-1-3.pdf Standard MIDI Files 1.0
*/
package vlq

import (
	"bufio"
	"io"
	"errors"
	"fmt"
)

// The maximum allowed VLQ value as defined by the spec
const MAX = 0x0FFFFFFF

// Read reads a single VLQ value from a bytes.Reader
func ReadVLQ(r io.Reader) (n int, read int, err error) {

	buffer := bufio.NewReader(r)
	mada := true
	for mada {
		// read the next byte
		b, err := buffer.ReadByte()
		if err != nil {
			return 0, read, err
		}

		// increment read bytes counter
		read++<commit_msg>VLQ Reader cleanup<commit_after>/*
Package vlq implements a library for handling variable-length quantity (vlq)
values specified by the MIDI file format.

See: https://www.midi.org/images/downloads/complete_midi_96-1-3.pdf Standard MIDI Files 1.0
*/
package vlq

import (
	"bufio"
	"errors"
	"fmt"
	"io"
)

// The maximum allowed VLQ value as defined by the spec
const MAX = 0x0FFFFFFF

// Read reads a single VLQ value from a bytes.Reader
func ReadVLQ(r io.Reader) (n int, read int, err error) {

	buffer := bufio.NewReader(r)
	mada := true
	for mada {
		// read the next byte
		b, err := buffer.ReadByte()
		if err != nil {
			return 0, read, err
		}

		// increment read bytes counter
		read++
{'fraction_non_alphanumeric': 0.10670511896178803, 'fraction_numerical': 0.012977649603460706, 'mean_word_length': 3.3785488958990535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2430119', 'n_tokens_mistral': 517, 'n_tokens_neox': 481, 'n_words': 175}