appendCRC

fun appendCRC(byteStream: IndexedFile.ByteArrayOutputStream)

Given a ByteArrayOutputStream, compute and append a 4-byte cyclic redundancy checksum. Write the Int in big-Endian order. The CRC is reasonably resilient to single-bit errors, and usually catches longer errors as well.

Parameters

byteStream

The ByteArrayOutputStream to read and append to.