mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-25 00:15:15 +00:00
Resharper code cleanup
This commit is contained in:
@@ -34,7 +34,8 @@ namespace SharpCompress.Compressor.PPMd.I1
|
||||
|
||||
public void RangeEncoderNormalize(Stream stream)
|
||||
{
|
||||
while ((low ^ (low + range)) < RangeTop || range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
|
||||
while ((low ^ (low + range)) < RangeTop ||
|
||||
range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
|
||||
{
|
||||
stream.WriteByte((byte) (low >> 24));
|
||||
range <<= 8;
|
||||
@@ -44,13 +45,13 @@ namespace SharpCompress.Compressor.PPMd.I1
|
||||
|
||||
public void RangeEncodeSymbol()
|
||||
{
|
||||
low += LowCount * (range /= Scale);
|
||||
low += LowCount*(range /= Scale);
|
||||
range *= HighCount - LowCount;
|
||||
}
|
||||
|
||||
public void RangeShiftEncodeSymbol(int rangeShift)
|
||||
{
|
||||
low += LowCount * (range >>= rangeShift);
|
||||
low += LowCount*(range >>= rangeShift);
|
||||
range *= HighCount - LowCount;
|
||||
}
|
||||
|
||||
@@ -74,7 +75,8 @@ namespace SharpCompress.Compressor.PPMd.I1
|
||||
|
||||
public void RangeDecoderNormalize(Stream stream)
|
||||
{
|
||||
while ((low ^ (low + range)) < RangeTop || range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
|
||||
while ((low ^ (low + range)) < RangeTop ||
|
||||
range < RangeBottom && ((range = (uint) -low & (RangeBottom - 1)) != 0 || true))
|
||||
{
|
||||
code = (code << 8) | (byte) stream.ReadByte();
|
||||
range <<= 8;
|
||||
@@ -84,18 +86,18 @@ namespace SharpCompress.Compressor.PPMd.I1
|
||||
|
||||
public uint RangeGetCurrentCount()
|
||||
{
|
||||
return (code - low) / (range /= Scale);
|
||||
return (code - low)/(range /= Scale);
|
||||
}
|
||||
|
||||
public uint RangeGetCurrentShiftCount(int rangeShift)
|
||||
{
|
||||
return (code - low) / (range >>= rangeShift);
|
||||
return (code - low)/(range >>= rangeShift);
|
||||
}
|
||||
|
||||
public void RangeRemoveSubrange()
|
||||
{
|
||||
low += range * LowCount;
|
||||
low += range*LowCount;
|
||||
range *= HighCount - LowCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user