/// <summary> /// Initializes the packet from a stream through a <see cref="Stream"/>. /// </summary> /// <param name="stream">A <see cref="Stream"/> containing the packet.</param> protected override void Initialize(Stream stream) { using (var reader = new BinaryReader(stream, Encoding.ASCII, true)) { FileID = new FileID { ID = reader.ReadBytes(16) }; while (reader.BaseStream.Position < reader.BaseStream.Length) { Checksums.Add(new InputFileSliceChecksum { MD5 = reader.ReadBytes(16), CRC32 = reader.ReadUInt32() }); } } }