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;
        }
Пример #2
0
 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);
            }
        }