code: public static byte[] calculateCrc32(byte[] b, int off, int length) {
          CRC32 crc32 = new CRC32();
          crc32.update(b, off, length);
          return toByteArray((int) (crc32.getValue() & 0xffffffffL));
      }
docs: Computes the CRC32 checksum for {@code length} bytes of the given data, starting from {@code off}.
  
  @param b
  the the data to compute the checksum for.
  @param off
  the buffer containing the data to compute the checksum for.
  @param length
  number of bytes to include in the checksum.
  
  @return An array containing calculated CRC32 value.