File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1919 <PrivateAssets >all</PrivateAssets >
2020 </PackageReference >
2121 <PackageReference Include =" MonoGame.Framework.WindowsDX" Version =" 3.8.0.1641" />
22- <PackageReference Include =" SharpZipLib" Version =" 1.4.1" />
2322 </ItemGroup >
2423</Project >
Original file line number Diff line number Diff line change 1515// You should have received a copy of the GNU General Public License
1616// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717
18- using ICSharpCode . SharpZipLib . Zip . Compression . Streams ;
1918using Microsoft . Xna . Framework ;
2019using System ;
2120using System . Collections . Generic ;
2221using System . Diagnostics ;
2322using System . IO ;
23+ using System . IO . Compression ;
2424using System . Text ;
2525
2626namespace Orts . Parsers . Msts
@@ -60,7 +60,9 @@ public static SBR Open(string filename)
6060 // SIMISA@@ means uncompressed
6161 if ( headerString . StartsWith ( "SIMISA@F" ) )
6262 {
63- fb = new InflaterInputStream ( fb ) ;
63+ // Skip over the 2 byte zlib header and onto the DEFLATE stream itself
64+ fb . Read ( buffer , 16 , 2 ) ;
65+ fb = new DeflateStream ( fb , CompressionMode . Decompress ) ;
6466 }
6567 else if ( headerString . StartsWith ( "\r \n SIMISA" ) )
6668 {
You can’t perform that action at this time.
0 commit comments