Updates the checksum by writing multiple long values from vals starting at offset for len entries. It writes as many longs as possible into the internal buffer (which is backed by a ByteArray) in little‑endian order. When there isn’t enough space, flush is called.