@@ -42,18 +42,30 @@ public sealed class BundleFile
4242
4343 private ArchiveFlags mask { get ; set ; }
4444
45- public BundleFile ( string path , bool original = false , string ? key = null )
46- : this ( new FileStream ( path , FileMode . Open , FileAccess . Read ) , original , key )
45+ public BundleFile ( string path , string ? key = null )
46+ : this ( new FileStream ( path , FileMode . Open , FileAccess . Read ) , key )
4747 {
4848 }
4949
50- public BundleFile ( Stream input , bool original = false , string ? key = null )
50+ public BundleFile ( Stream input , string ? key = null )
5151 {
5252 using AssetReader reader = new AssetReader ( input ) ;
5353
5454 UnityCNKey = key ;
5555
5656 Header = new Header ( reader ) ;
57+ ReadBundleWithHeader ( reader , Header , key ) ;
58+ }
59+
60+ public BundleFile ( AssetReader reader , Header header , string ? key = null )
61+ {
62+ UnityCNKey = key ;
63+ Header = header ;
64+ ReadBundleWithHeader ( reader , header , key ) ;
65+ }
66+
67+ private void ReadBundleWithHeader ( AssetReader reader , Header header , string ? key = null )
68+ {
5769 var version = ParseVersion ( ) ;
5870
5971 if ( version [ 0 ] < 2020 || //2020 and earlier
0 commit comments