How does the default cost function work?

The comment for Set says:

// To dynamically evaluate the items cost using the Config.Coster function, set
// the cost parameter to 0 and Coster will be ran when needed in order to find
// the items true cost.

What is the “true cost”? Is that bytes?

Yeah, bytes.