rar5: checkin missing file

This commit is contained in:
coderb
2017-12-17 20:54:54 -05:00
parent e13795651d
commit aec5a913da

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SharpCompress.Compressors.Rar
{
internal partial class Unpack
{
uint SlotToLength(uint Slot)
{
//uint LBits,Length=2;
int LBits;
uint Length=2;
if (Slot<8)
{
LBits=0;
Length+=Slot;
}
else
{
//LBits=Slot/4-1;
LBits=(int)(Slot/4-1);
Length+=(4 | (Slot & 3)) << LBits;
}
if (LBits>0)
{
Length+=getbits()>>(16-LBits);
AddBits(LBits);
}
return Length;
}
}
}