int streams = streamsWithData.size();
publishEvent(MuxyStreamEvent.BLOCK_FILE_WRITE, streams);
int currentFileOffset = (int) openWriteFile.size();
/* write out IDs in this block */
ByteBuf metaBuffer = PooledByteBufAllocator.DEFAULT.directBuffer(2 + 4 * streams + 4 + 8 * streams);
metaBuffer.writeShort(streams);
int bodyOutputSize = 0;
for (TempData out : streamsWithData) {
metaBuffer.writeInt(out.meta.streamID);
/* (4) chunk body offset (4) chunk length (n) chunk bytes */
bodyOutputSize += 8 + out.snapshotLength;