Generate a given pattern with the least numbers of bytes of code