write.c: Build up chunk offsets array in little-endian format