anchor.diff:      ComponentID: Byte;
       HSampling, VSampling: Byte;
       QuantID: Byte;
  -    SampleCount: Byte;  //number of samples in one interleaved block
       SampleOffset: Integer;  //first component has offset 0, second may have offset 4 (if 4:1:1), third: 5 etc.
       Run: PByte; //pointer to current position at output
     end;
  
positive.code:     PRED: array [0..3] of Integer;  //previous DC coefficient for each component.
        //After each RST it must reset to 0
        //no more than 4 components per scan is allowed, so we use static array here
      curCol: array [0..3] of Integer;  //to manage edges of image if part of block is used
      curLine: array [0..3] of Integer;
    //settings of current scan
      Ns: Word; //number of components in current scan
      ScanHeaders: array of TJpegScanHeader;
      exists: Boolean;
      SamplingSum: Integer;
      Ss: Byte; //start of spectral/predictor selection
      Se: Byte; //end of spectral/predictor selection
      Ah: Byte;
      Al: Byte;
  
      function NextByte: Byte;
      function NextWord: Word; //will swap
  
negative.code:     procedure DecodeQuantTable;
      procedure DecodeHuffmanTable;
      procedure DecodeSOF;
      procedure DecodeSequentialDCTScan;
      procedure DecodeDNL;
      procedure DecodeHuffmanBlock(CompNum, QuantID: Integer);
      procedure DecodeArithmBlock(CompNum, QuantID: Integer); //will raise exception so far
    public
      constructor Create(Properties: Pointer);
      destructor Destroy; override;
  