Byte alignment of weight layout transform

For weight which is subdivided to many same size cubes, how to achieve layout of each cube weight to be specfied bytes aligned?

Is there anyone who can give your understanding? Thanks!