Calculate average quality score from a quality string
Optimized for streaming with single-pass calculation.
ASCII quality string
Quality encoding scheme
Average quality score
const avg = calculateAverageQuality('IIIIIIIIII', 'phred33'); // 40 Copy
const avg = calculateAverageQuality('IIIIIIIIII', 'phred33'); // 40
Calculate average quality score from a quality string
Optimized for streaming with single-pass calculation.