Skip to content

Commit 049a8cf

Browse files
committed
Minor fixes and tweaks
1 parent 9a8875f commit 049a8cf

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

BitStream.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.IO;
33
using SabreTools.IO;
44

5+
// TODO: Add more complete implementation to SabreTools.IO
56
namespace SabreTools.Compression
67
{
78
/// <summary>
@@ -18,7 +19,7 @@ public class BitStream
1819
/// <summary>
1920
/// Original stream source
2021
/// </summary>
21-
private Stream _source;
22+
private readonly Stream _source;
2223

2324
/// <summary>
2425
/// Last read byte value from the stream

LZ/Decompressor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class Decompressor
5757
long read = lz.CopyTo(sourceState, destState, out LZERROR error);
5858

5959
// Copy the data to the buffer
60-
var decompressed = new byte[0];
60+
byte[]? decompressed;
6161
if (read == 0 || (error != LZERROR.LZERROR_OK && error != LZERROR.LZERROR_NOT_LZ))
6262
{
6363
decompressed = null;

MSZIP/DeflateDecompressor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class DeflateDecompressor
1313
/// <summary>
1414
/// Internal bitstream to use for decompression
1515
/// </summary>
16-
private BitStream _bitStream;
16+
private readonly BitStream _bitStream;
1717

1818
/// <summary>
1919
/// Create a new Decompressor from a byte array

0 commit comments

Comments
 (0)