// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.IO; namespace osu.Game.IO.Archives { /// /// Allows reading a single file from the provided byte array. /// public class ByteArrayArchiveReader : ArchiveReader { private readonly byte[] content; public ByteArrayArchiveReader(byte[] content, string filename) : base(filename) { this.content = content; } public override Stream GetStream(string name) => new MemoryStream(content); public override void Dispose() { } public override IEnumerable Filenames => new[] { Name }; } }