package ansi

import (
	

	
)

var parserPool = sync.Pool{
	New: func() any {
		 := NewParser()
		.SetParamsSize(parser.MaxParamsSize)
		.SetDataSize(1024 * 4) // 4KB of data buffer
		return 
	},
}

// GetParser returns a parser from a sync pool.
func () *Parser {
	return parserPool.Get().(*Parser)
}

// PutParser returns a parser to a sync pool. The parser is reset
// automatically.
func ( *Parser) {
	.Reset()
	.dataLen = 0
	parserPool.Put()
}