anchor.diff:    Classes, SysUtils;
   
   type
  +  {$IF CompilerVersion<=25}
  +  IntPtr=Integer;
  +  {$IFEND}
     TBufferAdapterStream = class(TStream)
     private
       FMaxSize:Integer;
       FMemory: Pointer;
  -    FSize, FPosition: Longint;
  +    FSize, FPosition: Int64;
     protected
       procedure SetPointer(Ptr: Pointer; Size: Longint);
     public
  
positive.code:       begin
          if Pos > FMaxSize then raise Exception.Create('TBufferAdapterStream::overflow');
        end;
        System.Move(Buffer, Pointer(Longint(FMemory) + FPosition)^, Count);
        FPosition := Pos;
        Result := Count;
        Exit;
  
negative.code:     if Result > 0 then
      begin
        if Result > Count then Result := Count;
        Move(Pointer(IntPtr(FMemory) + FPosition)^, Buffer, Result);
        Inc(FPosition, Result);
        Exit;
      end;
  