code: public void updateRemainder(byte[] bytes, int pos, int size_mod32) {
      if (pos < 0) {
        throw new IllegalArgumentException(String.format("Pos (%s) must be positive", pos));
      }
      if (size_mod32 < 0 || size_mod32 >= 32) {
        throw new IllegalArgumentException(
            String.format("size_mod32 (%s) must be between 0 and 31", size_mod32));
      }
      if (pos + size_mod32 > bytes.length) {
        throw new IllegalArgumentException("bytes must have at least size_mod32 bytes after pos");
      }
      int size_mod4 = size_mod32 & 3;
      int remainder = size_mod32 & ~3;
      byte[] packet = new byte[32];
      for (int i = 0; i < 4; ++i) {
        v0[i] += ((long)size_mod32 << 32) + size_mod32;
      }
      rotate32By(size_mod32, v1);
      for (int i = 0; i < remainder; i++) {
        packet[i] = bytes[pos + i];
      }
      if ((size_mod32 & 16) != 0) {
        for (int i = 0; i < 4; i++) {
          packet[28 + i] = bytes[pos + remainder + i + size_mod4 - 4];
        }
      } else {
        if (size_mod4 != 0) {
          packet[16 + 0] = bytes[pos + remainder + 0];
          packet[16 + 1] = bytes[pos + remainder + (size_mod4 >>> 1)];
          packet[16 + 2] = bytes[pos + remainder + (size_mod4 - 1)];
        }
      }
      updatePacket(packet, 0);
    }
docs: Updates the hash with the last 1 to 31 bytes of the data. You must use
  updatePacket first per 32 bytes of the data, if and only if 1 to 31 bytes
  of the data are not processed after that, updateRemainder must be used for
  those final bytes.
  @param bytes data array which has a length of at least pos + size_mod32
  @param pos position in the array to start reading size_mod32 bytes from
  @param size_mod32 the amount of bytes to read