move static table for byte wise select

refactor determine bits per value
add static table for byte wise popcount to core/api