src/jpm/dg/Util.java
/**
	 * Calculates the total number of LSBs that have been changed between two
	 * sets of byte arrays.
	 * 
	 * @param original
	 * @param modified
	 * @return The total number of bits different between original and modified.
	 */
Calculates the total number of LSBs that have been changed between two
sets of byte arrays.

@param original
@param modified
@return The total number of bits different between original and modified.
Calculates the total number of LSBs that have been changed between two sets of byte arrays . @param original @param modified @return The total number of bits different between original and modified .
public static int totalValueChange(byte[] original, byte[] modified) {
		int count = 0;
		int length = Math.min(original.length, modified.length);
		byte lsb = 0x03;
		for (int i = 0; i < length; i++) {
			byte a = original[i];
			byte b = modified[i];
			a &= lsb;
			b &= lsb;
			count += Math.abs(a - b);
		}
		return count;
	}
public static int totalValueChange ( byte [ ] original , byte [ ] modified ) { int count = 0 ; int length = Math . min ( original . length , modified . length ) ; byte lsb = 0x03 ; for ( int i = 0 ; i < length ; i ++ ) { byte a = original [ i ] ; byte b = modified [ i ] ; a &= lsb ; b &= lsb ; count += Math . abs ( a - b ) ; } return count ; }
Calculates the total number of LSBs that have been changed between two
 sets of byte arrays.
Calculates the total number of LSBs that have been changed between two sets of byte arrays .