compute size of formats at compile-time