mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-08 18:16:30 +00:00
Some clean up of unused vars
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,4 +24,4 @@ profiler-snapshots/
|
||||
.DS_Store
|
||||
*.snupkg
|
||||
benchmark-results/
|
||||
/.opencode
|
||||
.opencode/
|
||||
|
||||
@@ -9,7 +9,7 @@ internal static partial class IEntryExtensions
|
||||
{
|
||||
extension(IEntry entry)
|
||||
{
|
||||
public async ValueTask WriteEntryToDirectoryAsync(
|
||||
internal async ValueTask WriteEntryToDirectoryAsync(
|
||||
string destinationDirectory,
|
||||
ExtractionOptions? options,
|
||||
Func<string, CancellationToken, ValueTask> writeAsync,
|
||||
|
||||
@@ -10,7 +10,7 @@ internal static partial class IEntryExtensions
|
||||
/// <summary>
|
||||
/// Extract to specific directory, retaining filename
|
||||
/// </summary>
|
||||
public void WriteEntryToDirectory(
|
||||
internal void WriteEntryToDirectory(
|
||||
string destinationDirectory,
|
||||
ExtractionOptions? options,
|
||||
Action<string> write
|
||||
|
||||
@@ -239,7 +239,7 @@ internal partial class Unpack
|
||||
{
|
||||
Header.HeaderSize = 0;
|
||||
|
||||
if (!Inp.ExternalBuffer && Inp.InAddr > ReadTop - 7)
|
||||
if (Inp.InAddr > ReadTop - 7)
|
||||
{
|
||||
if (!await UnpReadBufAsync(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
@@ -292,7 +292,7 @@ internal partial class Unpack
|
||||
CancellationToken cancellationToken = default
|
||||
)
|
||||
{
|
||||
if (!Inp.ExternalBuffer && Inp.InAddr > ReadTop - 16)
|
||||
if ( Inp.InAddr > ReadTop - 16)
|
||||
{
|
||||
if (!await UnpReadBufAsync(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
|
||||
@@ -372,7 +372,7 @@ internal partial class Unpack
|
||||
|
||||
private bool ReadFilter(UnpackFilter Filter)
|
||||
{
|
||||
if (!Inp.ExternalBuffer && Inp.InAddr > ReadTop - 16)
|
||||
if ( Inp.InAddr > ReadTop - 16)
|
||||
{
|
||||
if (!UnpReadBuf())
|
||||
{
|
||||
@@ -762,7 +762,7 @@ internal partial class Unpack
|
||||
{
|
||||
Header.HeaderSize = 0;
|
||||
|
||||
if (!Inp.ExternalBuffer && Inp.InAddr > ReadTop - 7)
|
||||
if (Inp.InAddr > ReadTop - 7)
|
||||
{
|
||||
if (!UnpReadBuf())
|
||||
{
|
||||
|
||||
@@ -156,40 +156,25 @@ if (Decoded!=NULL)
|
||||
//struct UnpackFilter
|
||||
internal class UnpackFilter
|
||||
{
|
||||
public byte Type;
|
||||
public uint BlockStart;
|
||||
public uint BlockLength;
|
||||
public byte Channels;
|
||||
internal byte Type;
|
||||
internal uint BlockStart;
|
||||
internal uint BlockLength;
|
||||
internal byte Channels;
|
||||
|
||||
// uint Width;
|
||||
// byte PosR;
|
||||
public bool NextWindow;
|
||||
internal bool NextWindow;
|
||||
};
|
||||
|
||||
//struct UnpackFilter30
|
||||
internal class UnpackFilter30
|
||||
{
|
||||
public uint BlockStart;
|
||||
public uint BlockLength;
|
||||
public bool NextWindow;
|
||||
|
||||
// Position of parent filter in Filters array used as prototype for filter
|
||||
// in PrgStack array. Not defined for filters in Filters array.
|
||||
public uint ParentFilter;
|
||||
|
||||
/*#if !RarV2017_RAR5ONLY
|
||||
public VM_PreparedProgram Prg;
|
||||
#endif*/
|
||||
};
|
||||
|
||||
internal class AudioVariables // For RAR 2.0 archives only.
|
||||
{
|
||||
public int K1,
|
||||
internal int K1,
|
||||
K2,
|
||||
K3,
|
||||
K4,
|
||||
K5;
|
||||
public int D1,
|
||||
internal int D1,
|
||||
D2,
|
||||
D3,
|
||||
D4;
|
||||
@@ -369,7 +354,6 @@ internal partial class Unpack
|
||||
#endif*/
|
||||
private int PPMEscChar;
|
||||
|
||||
private readonly byte[] UnpOldTable = new byte[HUFF_TABLE_SIZE30];
|
||||
|
||||
// If we already read decoding tables for Unpack v2,v3,v5.
|
||||
// We should not use a single variable for all algorithm versions,
|
||||
@@ -379,25 +363,7 @@ internal partial class Unpack
|
||||
private bool TablesRead2,
|
||||
TablesRead5;
|
||||
|
||||
// Virtual machine to execute filters code.
|
||||
/*#if !RarV2017_RAR5ONLY
|
||||
RarVM VM;
|
||||
#endif*/
|
||||
|
||||
// Buffer to read VM filters code. We moved it here from AddVMCode
|
||||
// function to reduce time spent in BitInput constructor.
|
||||
private readonly BitInput VMCodeInp = new(true);
|
||||
|
||||
// Filters code, one entry per filter.
|
||||
private readonly List<UnpackFilter30> Filters30 = new();
|
||||
|
||||
// Filters stack, several entrances of same filter are possible.
|
||||
private readonly List<UnpackFilter30> PrgStack = new();
|
||||
|
||||
// Lengths of preceding data blocks, one length of one last block
|
||||
// for every filter. Used to reduce the size required to write
|
||||
// the data block length if lengths are repeating.
|
||||
private readonly List<int> OldFilterLengths = new();
|
||||
|
||||
/*#if RarV2017_RAR_SMP
|
||||
// More than 8 threads are unlikely to provide a noticeable gain
|
||||
|
||||
@@ -22,8 +22,7 @@ internal class BitInput : IDisposable
|
||||
get => inBit;
|
||||
set => inBit = value;
|
||||
}
|
||||
public bool ExternalBuffer;
|
||||
private byte[] _privateBuffer = ArrayPool<byte>.Shared.Rent(MAX_SIZE);
|
||||
private readonly byte[] _privateBuffer = ArrayPool<byte>.Shared.Rent(MAX_SIZE);
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary> </summary>
|
||||
|
||||
@@ -268,9 +268,9 @@
|
||||
"net10.0": {
|
||||
"Microsoft.NET.ILLink.Tasks": {
|
||||
"type": "Direct",
|
||||
"requested": "[10.0.5, )",
|
||||
"resolved": "10.0.5",
|
||||
"contentHash": "A+5ZuQ0f449tM+MQrhf6R9ZX7lYpjk/ODEwLYKrnF6111rtARx8fVsm4YznUnQiKnnXfaXNBqgxmil6RW3L3SA=="
|
||||
"requested": "[10.0.6, )",
|
||||
"resolved": "10.0.6",
|
||||
"contentHash": "QKuvS0LWX4fjFqeDkyM7Kqt8P3wYTiPD4nwU+9y59n0sCiG714fxDgbbN82vDnzq89AF/PiHl92TP2C4aFDUQA=="
|
||||
},
|
||||
"Microsoft.NETFramework.ReferenceAssemblies": {
|
||||
"type": "Direct",
|
||||
@@ -358,9 +358,9 @@
|
||||
"net8.0": {
|
||||
"Microsoft.NET.ILLink.Tasks": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.25, )",
|
||||
"resolved": "8.0.25",
|
||||
"contentHash": "sqX4nmBft05ivqKvUT4nxaN8rT3apCLt9SWFkfRrQPwra1zPwFknQAw1lleuMCKOCLvVmOWwrC2iPSm9RiXZUg=="
|
||||
"requested": "[8.0.26, )",
|
||||
"resolved": "8.0.26",
|
||||
"contentHash": "o7/yVssM2r9Wyln2s9edBd5ANZXqdSdBI+g7JqXkyJmXrhs2WsJp25K5yPnYrTgdKBCjKB8bg+O2oew4sgzFaA=="
|
||||
},
|
||||
"Microsoft.NETFramework.ReferenceAssemblies": {
|
||||
"type": "Direct",
|
||||
|
||||
@@ -309,30 +309,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
".NETFramework,Version=v4.8/win-x86": {
|
||||
"Microsoft.Win32.Registry": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.0",
|
||||
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.AccessControl": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.0",
|
||||
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"dependencies": {
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.0",
|
||||
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
|
||||
}
|
||||
},
|
||||
"net10.0": {
|
||||
"AwesomeAssertions": {
|
||||
"type": "Direct",
|
||||
@@ -545,13 +521,6 @@
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw=="
|
||||
}
|
||||
},
|
||||
"net10.0/win-x86": {
|
||||
"Microsoft.Win32.Registry": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.0",
|
||||
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user