边缘 |
2022-07-21 16:22 |
第5步的判断,是在r0的8次跑完再判断,还是8次以内就判断? 现在得不出正确的结果,不知道是我代码写错了,还是理解错了 下面是我的代码,写得稀烂,将就着看看
br.BaseStream.Seek(offsetCodeStart,0); byte[] byteWrite = new byte[1024]; for (int i=0;i<0x39;i++) { byte toDecode = br.ReadByte(); byte lastByte=new byte(); byte curByte =new byte(); r0 = 7; r14 = 0x17D; while (r0 != 0xffffffff) { if (GetBit(toDecode, (short)r0) == 0) { r14 = BitConverter.ToInt32(byteEncodeTable, r14 * 0xC + 4); } else { r14 = BitConverter.ToInt32(byteEncodeTable, r14 * 0xC + 8); }
//r14 = BitConverter.ToInt32(byteTemp, 0); r0--; if (r14 <= 0xff) { lastByte = curByte; curByte = Convert.ToByte(r14); byteWrite[byteOut] = curByte; byteOut += 1; r14 = 0x17D; //if (lastByte == 0xff && curByte == 0xf0) break; } }
} |
|