class NumSetBits {

	public static long getNumSetBitsBetweenWholeBytes(byte[] array,
			int firstByte, int lastByte) {
		long totalBits = 0;
		for (int index = firstByte; index <= lastByte; index++) {
			totalBits += getNumSetBits(array[index], 0, 7);
		}

		return totalBits;
	}

}