anchor.diff:      case Block._CompressionType of
         0,1: // uncompressed (I'm not sure about 1)
         begin
  +        {$IFDEF LZW_DEBUG}
  +        writeln('Uncompressed image type');
  +        {$ENDIF}
           MemCopy( Block._Data^, BitmapOutputPointer^, Block._Size );
           BytesWrittenFromBlock := Block._Size;
           inc( BytesWritten, BytesWrittenFromBlock );
  
positive.code:          > BitmapData + TotalSize ) then
        assert( false );
  
  { NOTE: This doesn't seem right. It moves the pointer so later the moving of data to
    ImageData will be wrong! }
  //    inc( BitmapOutputPointer, BytesWrittenFromBlock ); TPersistentObjectState
    end;
  
    i := TotalSize + SizeOf(_Header) + GetPaletteSize;
    img := CreateImage_BMP(BitmapData, i);
  
    AllocateImage(32, _Header.cx, _Header.cy);
  
    {$IFDEF LZW_DEBUG}
    writeln('Width = ', Width);
    writeln('Height = ', Height);
    writeln('ImageDataSize = ', ImageDataSize);
    writeln('------------- START -------------');
    for i := 1 to ImageDataSize do
    begin
      write(HexStr(BitmapOutputPointer[i-1],2)+' ');
      if (i mod 16 = 0) then
        writeln('')
      else if (i mod 4 = 0) then
        write (' | ');
    end;
    Writeln('');
    writeln('------------- END -------------');
    {$ENDIF}
  
  //  Move(BitmapOutputPointer^, ImageData^, ImageDataSize);
    Move(img.ImageData^, self.ImageData^, img.ImageDataSize);
    UpdateImage;
    img.Free;
  
  
negative.code:   ptr: PByte;
    i: integer;
    img: TfpgImage;
    {$IFDEF LZW_DEBUG}
    s: TFileStream;
    {$ENDIF}
  begin
    BitmapOutputPointer := nil;
    BitmapData := nil;
    ptr := nil;
    lastOutByte := $0;
  
    // Allocate memory to store the bitmap
    BitmapData := GetMem( TotalSize );
  