private static void calcChecksum(byte[] bytes, int len) {
    Adler32 a32 = new Adler32();

    a32.update(bytes, 12, len - 12);

    int sum = (int) a32.getValue();

    bytes[8] = (byte) sum;
    bytes[9] = (byte) (sum >> 8);
    bytes[10] = (byte) (sum >> 16);
    bytes[11] = (byte) (sum >> 24);
  }
Calculates the checksum for the {@code .dex} file in the given array, and modify the array to
contain it.

@param bytes {@code non-null;} the bytes of the file
@param len length of {@code .dex} file encoded in the array
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/DexFile.java