public void Start() { buffer0 = reader.Readbyte(); buffer1 = reader.Readbyte(); c = BinaryOperation.Bit32ShiftL((buffer0 ^ 0xff), 16); Readbyte(); c = BinaryOperation.Bit32ShiftL(c, 7); counter -= 7; a = 0x80000000l; }
public void SkipTo(long length) { while (noOfbytesRead < length) { reader.Readbyte(); noOfbytesRead++; } }
private void HandlePageAssociation(SegmentHeader segmentHeader) { int pageAssociation; bool isPageAssociationSizeSet = segmentHeader.IsPageAssociationSizeSet(); if (isPageAssociationSizeSet) { // field is 4 bytes long short[] buf = new short[4]; reader.Readbyte(buf); pageAssociation = BinaryOperation.GetInt32(buf); } else { // field is 1 byte long pageAssociation = reader.Readbyte(); } segmentHeader.SetPageAssociation(pageAssociation); if (JBIG2StreamDecoder.debug) { Console.WriteLine("pageAssociation = " + pageAssociation); } }