il2cpp4.6.3´bugsharpzipLibʹã
bug£
byte b = 205;
Debug.Log( (b & 0xff) << 8)
il2cpp±ʽ0
sharpzipLibԴ룬bug
1.StreamManipulatorPeekBits
public int PeekBits(int bitCount)
{
if (bitsInBuffer_ < bitCount) {
if (windowStart_ == windowEnd_) {
return -1; // ok
}
int tmp1 = window_[windowStart_++] & 0xff;
int tmp2 = window_[windowStart_++] & 0xff;
buffer_ |= (uint)((tmp1 | tmp2 << 8) << bitsInBuffer_);
bitsInBuffer_ += 16;
}
return (int)(buffer_ & ((1 << bitCount) - 1));
}
2.DeflaterHuffmanBitReverse£
public static short BitReverse(int toReverse)
{
int t1 = bit4Reverse[toReverse & 0xF];
int t2 = bit4Reverse[(toReverse >> 4) & 0xF];
int t3 = bit4Reverse[(toReverse >> 8) & 0xF];
int t4 = bit4Reverse[(toReverse >> 12) & 0xF];
int t5 = t1 << 12;
int t6 = t2 << 8;
int t7 = t3 << 4;
int t8 = t4 << 0;
return (short) (t5 | t6 | t7 | t8);
}