anchor.diff:      if Result > 0 then
       begin
         if Result > Count then Result := Count;
  -      Move(Pointer(Longint(FMemory) + FPosition)^, Buffer, Result);
  +      Move(Pointer(IntPtr(FMemory) + FPosition)^, Buffer, Result);
         Inc(FPosition, Result);
         Exit;
       end;
  
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:   Classes, SysUtils;
  
  type
    {$IF CompilerVersion<=25}
    IntPtr=Integer;
    {$IFEND}
    TBufferAdapterStream = class(TStream)
    private
      FMaxSize:Integer;
      FMemory: Pointer;
      FSize, FPosition: Int64;
    protected
      procedure SetPointer(Ptr: Pointer; Size: Longint);
    public
  