Switch code compression