private static BigFraction fromByteArray(byte[] b){
			int numeratorSign = 0;
			int denominatorSign = 0;
			byte[] numeratorArray;
			byte[] denominatorArray;
			BigInteger numerator = BigInteger.valueOf(0);
			BigInteger denominator = BigInteger.valueOf(0);
			int i = 0;
			int j = b.length;
			if(b[0] == -1){
				numeratorSign = -1;
				byte[] c = new byte[j - 1];
				System.arraycopy(b, 1, c, 0, j - 1);
				b = c.clone();
			}
			else{
				numeratorSign = 1;
			}
			j = b.length;
			for(;i < j;i++){
				if(b[i] == -2){
					break;
				}
			}
			if(b[i] != -2){
				throw new IllegalArgumentException();
			}
			numeratorArray = new byte[i];
			System.arraycopy(b, 0, numeratorArray, 0, i);
			i++;
			j = b.length;
			if(b[i] == -1){
				denominatorSign = -1;
				denominatorArray = new byte[j - i - 1];
				System.arraycopy(b, i + 1, denominatorArray, 0, j - i - 1);
			}
			else{
				denominatorSign = 1;
				denominatorArray = new byte[j - i];
				System.arraycopy(b, i, denominatorArray, 0, j - i);
			}
			numerator = byteArrayToBigInteger(numeratorArray, numeratorSign);
			denominator = byteArrayToBigInteger(denominatorArray, denominatorSign);
			return new BigFraction(numerator, denominator);
		}