This commit is contained in:
Adam Hathcock
2025-10-23 11:43:38 +01:00
parent cc84f6fee4
commit f0d28aa5cf
4 changed files with 6 additions and 16 deletions

View File

@@ -73,9 +73,7 @@ internal static class UnpackUtility
}
long len14 = decodeLen[14];
return bitField < len14
? (bitField < decodeLen[13] ? 13 : 14)
: 15;
return bitField < len14 ? (bitField < decodeLen[13] ? 13 : 14) : 15;
}
internal static void makeDecodeTables(
@@ -91,7 +89,7 @@ internal static class UnpackUtility
long M,
N;
Array.Clear(dec.DecodeNum,0, dec.DecodeNum.Length);
Array.Clear(dec.DecodeNum, 0, dec.DecodeNum.Length);
for (i = 0; i < size; i++)
{
lenCount[lenTab[offset + i] & 0xF]++;

View File

@@ -1,5 +1,3 @@
using System;
using System.Buffers;
using System.Buffers.Binary;
@@ -43,11 +41,7 @@ internal sealed class RarVM : BitInput
private int IP;
internal RarVM()
{
}
internal RarVM() { }
public override void Dispose()
{

View File

@@ -22,8 +22,7 @@ internal static class Utility
/// <param name="number">Number to operate on</param>
/// <param name="bits">Amount of bits to shift</param>
/// <returns>The resulting number from the shift operation</returns>
public static int URShift(int number, int bits) =>
(int)((uint)number >> bits);
public static int URShift(int number, int bits) => (int)((uint)number >> bits);
/// <summary>
/// Performs an unsigned bitwise right shift with the specified number
@@ -31,8 +30,7 @@ internal static class Utility
/// <param name="number">Number to operate on</param>
/// <param name="bits">Amount of bits to shift</param>
/// <returns>The resulting number from the shift operation</returns>
public static long URShift(long number, int bits) =>
(long)((ulong)number >> bits);
public static long URShift(long number, int bits) => (long)((ulong)number >> bits);
public static void SetSize(this List<byte> list, int count)
{

View File

@@ -22,7 +22,7 @@ using (var __ = JetbrainsProfiler.Cpu($"/Users/adam/temp/"))
{
var testArchives = new[]
{
"Rar.Audio_program.rar"
"Rar.Audio_program.rar",
//"64bitstream.zip.7z",
//"TarWithSymlink.tar.gz"