private byte[] GetBytesForHash() { using (var ms = new MemoryStream()) { using (var writer = new BinaryWriter(ms)) { writer.Write(BlockData.GetBlocksBytes()); Serializer.Serialize(ms, BlockData.GetTags()); Serializer.Serialize(ms, BlockData.ChunkMetaData); Serializer.Serialize(ms, BlockData.ColumnsInfo); Serializer.Serialize(ms, Entities); return(ms.ToArray()); } } }