public byte[] toZOrderByteArray(final BigInteger bigInt){
  final int numDimensions=datatypeConfig.getNumDimensions();
  final byte[] bigIntAsByteArr=bigInt.toByteArray();
  final int paddedArraySize=numDimensions * BASE_SIZE + 1;
  final byte[] bigIntAsByteArrPad=new byte[paddedArraySize];
  int idx=0;
  for (int i=0; i < paddedArraySize - bigIntAsByteArr.length; i++) {
    bigIntAsByteArrPad[idx++]=0;
  }
  for (int i=0; i < bigIntAsByteArr.length; i++) {
    bigIntAsByteArrPad[idx++]=bigIntAsByteArr[i];
  }
  final byte[] bigIntAsByteArrUnsigned=unpadLeadingZero(bigIntAsByteArrPad);
  return bigIntAsByteArrUnsigned;
}

public byte [ ] toZOrderByteArray ( final BigInteger bigInt ) { final int numDimensions = datatypeConfig . getNumDimensions ( ) ; final byte [ ] bigIntAsByteArr = bigInt . toByteArray ( ) ; final int paddedArraySize = numDimensions * BASE_SIZE + 1 ; final byte [ ] bigIntAsByteArrPad = new byte [ paddedArraySize ] ; int idx = 0 ; for ( int i = 0 ; i < paddedArraySize - bigIntAsByteArr . length ; i ++ ) { bigIntAsByteArrPad [ idx ++ ] = 0 ; } for ( int i = 0 ; i < bigIntAsByteArr . length ; i ++ ) { bigIntAsByteArrPad [ idx ++ ] = bigIntAsByteArr [ i ] ; } final byte [ ] bigIntAsByteArrUnsigned = unpadLeadingZero ( bigIntAsByteArrPad ) ; return bigIntAsByteArrUnsigned ; }
decodes a biginteger into a zorder byte [ ] ( without leading zero ) . implements transformation f - > e .
