protected override byte[] GetArkEntryBytes(ArkEntry entry) { string filePath = Path.Combine(_fullPath, entry.FullPath); var bytes = File.ReadAllBytes(filePath); // TODO: Figure out a better place to put this compression check if (entry.Extension.Equals("gz", StringComparison.CurrentCultureIgnoreCase)) { return(Compression.InflateBlock(bytes, CompressionType.GZIP)); } // TODO: Check zlib (Else if statement) return(bytes); }
public Stream GetArkEntryFileStream(ArkEntry entry) => new MemoryStream(GetArkEntryBytes(entry), false); // Read-only