Reduce more Linq usage

This commit is contained in:
Matt Nadareski
2024-12-06 13:57:48 -05:00
parent ea753aeb06
commit d78ff5eb67
7 changed files with 89 additions and 101 deletions

View File

@@ -462,10 +462,7 @@ namespace SabreTools.FileTypes.Archives
BinaryWriter sw = new(outputStream);
// Write standard header and TGZ info
byte[] data = TorrentGZHeader
.Concat(baseFile.MD5!) // MD5
.Concat(baseFile.CRC!) // CRC
.ToArray();
byte[] data = [.. TorrentGZHeader, .. baseFile.MD5!, .. baseFile.CRC!];
sw.Write(data);
sw.Write((ulong)(baseFile.Size ?? 0)); // Long size (Unsigned, Mirrored)