File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ namespace Totk.ZStdTool.Helpers;
5
5
6
6
public class ZStdHelper
7
7
{
8
+ private static readonly Decompressor _defaultDecompressor = new ( ) ;
8
9
private static readonly Decompressor _commonDecompressor = new ( ) ;
9
10
private static readonly Decompressor _mapDecompressor = new ( ) ;
10
11
private static readonly Decompressor _packDecompressor = new ( ) ;
12
+ private static readonly Compressor _defaultCompressor = new ( 16 ) ;
11
13
private static readonly Compressor _commonCompressor = new ( 16 ) ;
12
14
private static readonly Compressor _mapCompressor = new ( 16 ) ;
13
15
private static readonly Compressor _packCompressor = new ( 16 ) ;
@@ -32,6 +34,7 @@ public static Span<byte> Decompress(string file)
32
34
return
33
35
file . EndsWith ( ".bcett.byml.zs" ) ? _mapDecompressor . Unwrap ( src ) :
34
36
file . EndsWith ( ".pack.zs" ) ? _packDecompressor . Unwrap ( src ) :
37
+ file . EndsWith ( ".rsizetable.zs" ) ? _defaultDecompressor . Unwrap ( src ) :
35
38
_commonDecompressor . Unwrap ( src ) ;
36
39
}
37
40
public static Span < byte > Compress ( string file )
@@ -40,6 +43,7 @@ public static Span<byte> Compress(string file)
40
43
return
41
44
file . EndsWith ( ".bcett.byml" ) ? _mapCompressor . Wrap ( src ) :
42
45
file . EndsWith ( ".pack" ) ? _packCompressor . Wrap ( src ) :
46
+ file . EndsWith ( ".rsizetable" ) ? _defaultCompressor . Wrap ( src ) :
43
47
_commonCompressor . Wrap ( src ) ;
44
48
}
45
49
You can’t perform that action at this time.
0 commit comments