public static int[] expand(int al){
  if (al == 0)   return new int[0];
  final int numLinks=((31 - Integer.numberOfLeadingZeros(al)) / 8) + 1;
  final int[] links=new int[numLinks];
  for (int i=0; i < numLinks; ++i) {
    int pos=i * 8;
    int mask=0xff << pos;
    int lnk=(al & mask) >>> pos;
    links[i]=lnk - 1;
  }
  return links;
}

public static int [ ] expand ( int al ) { if ( al == 0 ) return new int [ 0 ] ; final int numLinks = ( ( 31 - Integer . numberOfLeadingZeros ( al ) ) / 8 ) + 1 ; final int [ ] links = new int [ numLinks ] ; for ( int i = 0 ; i < numLinks ; ++ i ) { int pos = i * 8 ; int mask = 0xff << pos ; int lnk = ( al & mask ) > > > pos ; links [ i ] = lnk - 1 ; } return links ; }
decompress a set of alignment links .
