Re: librsync stream interface

Martin Pool <[email protected]> Mon, 01 Jun 2015 00:02:24 +0000
Newsgroups gmane.network.librsync.general
Message-ID <CAA9uavDOG0=6zrKX-yDO3VoxdED2DidCQDqz7kC9oZea7g-8iw@mail.gmail.com>
--===============5674666734624434391==
Content-Type: multipart/alternative; boundary=089e013a06061361620517698b74

--089e013a06061361620517698b74
Content-Type: text/plain; charset=UTF-8

Have a look at the implementation of rs_loadsig_file, which shows that you
construct a new job with rs_loadsig_begin, then feed data into it.

You can do this either through rs_job_drive which will call back to you, or
by establishing your own callbacks then calling rs_job_iter.

On Sun, May 31, 2015 at 9:39 AM Denis Corbin <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I could find how to generate a signature thanks to rs_sig_begin()
> rs_job_iter() and rs_job_free(). Here the signature is kept in memory
> gathering the rs_buffer_t's next_out and avail_out fields as updated
> by rs_job_iter().
>
> Now having this signature in memory, I cannot find how to setup a
> rs_signature_t data that is required to be fed to rs_delta_begin(), in
> order to perform a delta operation.
>
> I could only find rs_loadsig_file() but this requires a FILE*
> datastructure which is not of much help in my case as the signature is
> not on filesystem but in memory.
>
> What did I overlooked?
>
> Thanks for any help,
> Denis.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIVAwUBVWs5NwgxsL0D2LGCAQKkvw//WHWEKIWJeWxALPN6f1V6cjqPq8qyX0Ls
> 9G/M1RIKXL1p8CLp2mOuIhlMm+BsXsXi08BPXKeKJNP02b82U7e64To8Dcr4d3gG
> u8aRqy4+tO8iazszZn4sBoiLbnlrfkvHkAsiyL/vvD0VbQkm76Kn/jiF0ooHKCOJ
> f8VsKaGki467XhjLAiVHoMZHWPVhxPJOjb+M6nrdU08LNnlEVW33vJHVk3gFx2d8
> L5Vv528b1SA0zcccuTfd3sf1TJ/PTFqU0BAY3mbiYNgwmvzS6jv3DfDzcKBynwLV
> EDgEN+zRQZmhVUbL3tNc+6z6B3RfH4dgVoXgsAq/tCcXFkoLceLDL7OpSqSB9Hvi
> jSVpFTBzRDJtg1GBSVk+hGKH7TDK9gPC0kGuEH/QkN3Lu2ui2wtkShFZbqnikT/8
> uLXXrWvPJfJU7wsLLyCADSiDjA97URLjFO8p7jAd+Zgsg6WIDkJqHzp+fIoTH3zF
> pQRZD2p2k6VU7A3yTog+TRUmFOSLRA3W+UH1hxEIDg30LWa+M8V+pGyJ0/599rrN
> pucko57hDauUViqMAnZFdmJqEh9M9PxUxxbA5j1tjfbiQtSX4k8dNsWwdMCSXTC0
> jIRgEzgMwn9SX+HfmEF0KfaQYcl7Q3MXOp6fwqj2PFxkADT5lyTuJMrGPtDuwmsm
> Oxoi6M7DVWM=
> =RWp1
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> librsync-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/librsync-users
>

--089e013a06061361620517698b74
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Have a look at the implementation of rs_loadsig_file, whic=
h shows that you construct a new job with rs_loadsig_begin, then feed data =
into it.<br><div><br></div><div>You can do this either through rs_job_drive=
 which will call back to you, or by establishing your own callbacks then ca=
lling rs_job_iter.</div></div><br><div class=3D"gmail_quote">On Sun, May 31=
, 2015 at 9:39 AM Denis Corbin &lt;<a href=3D"mailto:[email protected]">dar=
[email protected]</a>&gt; wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN =
PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi,<br>
<br>
I could find how to generate a signature thanks to rs_sig_begin()<br>
rs_job_iter() and rs_job_free(). Here the signature is kept in memory<br>
gathering the rs_buffer_t&#39;s next_out and avail_out fields as updated<br=
>
by rs_job_iter().<br>
<br>
Now having this signature in memory, I cannot find how to setup a<br>
rs_signature_t data that is required to be fed to rs_delta_begin(), in<br>
order to perform a delta operation.<br>
<br>
I could only find rs_loadsig_file() but this requires a FILE*<br>
datastructure which is not of much help in my case as the signature is<br>
not on filesystem but in memory.<br>
<br>
What did I overlooked?<br>
<br>
Thanks for any help,<br>
Denis.<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.12 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href=3D"http://enigmail.mozdev.org/"=
 target=3D"_blank">http://enigmail.mozdev.org/</a><br>
<br>
iQIVAwUBVWs5NwgxsL0D2LGCAQKkvw//WHWEKIWJeWxALPN6f1V6cjqPq8qyX0Ls<br>
9G/M1RIKXL1p8CLp2mOuIhlMm+BsXsXi08BPXKeKJNP02b82U7e64To8Dcr4d3gG<br>
u8aRqy4+tO8iazszZn4sBoiLbnlrfkvHkAsiyL/vvD0VbQkm76Kn/jiF0ooHKCOJ<br>
f8VsKaGki467XhjLAiVHoMZHWPVhxPJOjb+M6nrdU08LNnlEVW33vJHVk3gFx2d8<br>
L5Vv528b1SA0zcccuTfd3sf1TJ/PTFqU0BAY3mbiYNgwmvzS6jv3DfDzcKBynwLV<br>
EDgEN+zRQZmhVUbL3tNc+6z6B3RfH4dgVoXgsAq/tCcXFkoLceLDL7OpSqSB9Hvi<br>
jSVpFTBzRDJtg1GBSVk+hGKH7TDK9gPC0kGuEH/QkN3Lu2ui2wtkShFZbqnikT/8<br>
uLXXrWvPJfJU7wsLLyCADSiDjA97URLjFO8p7jAd+Zgsg6WIDkJqHzp+fIoTH3zF<br>
pQRZD2p2k6VU7A3yTog+TRUmFOSLRA3W+UH1hxEIDg30LWa+M8V+pGyJ0/599rrN<br>
pucko57hDauUViqMAnZFdmJqEh9M9PxUxxbA5j1tjfbiQtSX4k8dNsWwdMCSXTC0<br>
jIRgEzgMwn9SX+HfmEF0KfaQYcl7Q3MXOp6fwqj2PFxkADT5lyTuJMrGPtDuwmsm<br>
Oxoi6M7DVWM=3D<br>
=3DRWp1<br>
-----END PGP SIGNATURE-----<br>
<br>
---------------------------------------------------------------------------=
---<br>
_______________________________________________<br>
librsync-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">l=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/librsync-users" tar=
get=3D"_blank">https://lists.sourceforge.net/lists/listinfo/librsync-users<=
/a><br>
</blockquote></div>

--089e013a06061361620517698b74--


--===============5674666734624434391==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============5674666734624434391==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
librsync-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsync-users

--===============5674666734624434391==--