Automatic hierarchy codec builders