formatting

This commit is contained in:
Adam Hathcock
2025-01-14 08:55:09 +00:00
parent 3875f62453
commit a89fc3a276
4 changed files with 15 additions and 5 deletions

View File

@@ -15,7 +15,8 @@ namespace SharpCompress.Archives.Rar;
public class RarArchive : AbstractArchive<RarArchiveEntry, RarVolume>
{
private bool _disposed;
internal Lazy<IRarUnpack> UnpackV2017 { get; } = new(() => new Compressors.Rar.UnpackV2017.Unpack());
internal Lazy<IRarUnpack> UnpackV2017 { get; } =
new(() => new Compressors.Rar.UnpackV2017.Unpack());
internal Lazy<IRarUnpack> UnpackV1 { get; } = new(() => new Compressors.Rar.UnpackV1.Unpack());
/// <summary>

View File

@@ -393,7 +393,9 @@ internal partial class Unpack
{
Span<byte> BitLength = stackalloc byte[PackDef.BC20];
Span<byte> Table = stackalloc byte[PackDef.MC20 * 4];
int TableSize, N, I;
int TableSize,
N,
I;
if (inAddr > readTop - 25)
{
if (!unpReadBuf())

View File

@@ -181,12 +181,18 @@ internal static class UnpackUtility
return (dec.DecodeNum[N]);
}
internal static void makeDecodeTables(Span<byte> lenTab, int offset, Decode.Decode dec, int size)
internal static void makeDecodeTables(
Span<byte> lenTab,
int offset,
Decode.Decode dec,
int size
)
{
Span<int> lenCount = stackalloc int[16];
Span<int> tmpPos = stackalloc int[16];
int i;
long M, N;
long M,
N;
new Span<int>(dec.DecodeNum).Clear(); // memset(Dec->DecodeNum,0,Size*sizeof(*Dec->DecodeNum));

View File

@@ -15,7 +15,8 @@ public abstract class RarReader : AbstractReader<RarReaderEntry, RarVolume>
{
private bool _disposed;
private RarVolume? volume;
private Lazy<IRarUnpack> UnpackV2017 { get; } = new(() => new Compressors.Rar.UnpackV2017.Unpack());
private Lazy<IRarUnpack> UnpackV2017 { get; } =
new(() => new Compressors.Rar.UnpackV2017.Unpack());
private Lazy<IRarUnpack> UnpackV1 { get; } = new(() => new Compressors.Rar.UnpackV1.Unpack());
internal RarReader(ReaderOptions options)