rewrite bin checks without nested case statements
rewrite bin checks without nested case statements

toy/image_optim,ramiroaraujo/image_optim,ramiroaraujo/image_optim,mihailim/image_optim,mihailim/image_optim,toy/image_optim,weheartit/image_optim,toy/image_optim,weheartit/image_optim,mihailim/image_optim,ramiroaraujo/image_optim,weheartit/image_optim