public static IBinaryStream CreateStream(IBinaryStream input, int unpacked_size) { input.Position = 0xD; var ike = new IkeReader(input, unpacked_size); var data = ike.Unpack(); return(new BinMemoryStream(data)); }
public override Stream OpenEntry(ArcFile arc, Entry entry) { var pent = entry as PackedEntry; if (null == pent || !pent.IsPacked) { return(base.OpenEntry(arc, entry)); } using (var input = arc.File.CreateStream(entry.Offset, entry.Size)) { var reader = new IkeReader(input, (int)pent.UnpackedSize); var data = reader.Unpack(); return(new BinMemoryStream(data, entry.Name)); } }