Oh, I misunderstood. Dillo is correct. Thomas On Mon, May 07, 2012 at 10:21:40AM +0200, Thomas Klausner wrote: > Hi Jan! > > On Mon, May 07, 2012 at 09:54:28AM +0200, Jan Weià wrote: > > I am using a library call that effectively results in me getting a buffer > > which contains the data of a zip file. (zip is used as the container format > > for OpenOffice documents.) > > > > In my prototype I just save that data to disk and open it with zip_open(). > > This appears to be a silly and roundabout way of doing things. I could do > > something weird like this, of course: > > > > How to get file descriptor of buffer in memory? > > http://stackoverflow.com/questions/1558772/how-to-get-file-descriptor-of-buffer-in-memory > > > > â and then use zip_fdopen(), but I donât like that either. > > > > Is there currently a way to do this cleanly? > > Sure! Use zip_source_buffer(). See e.g. in the zip_add() man page. > There's even a standalone example for that in regress/add_from_buffer.c. > > It's referenced in libzip(3) and all the other zip_source_*() man > pages AFAICT. Let me know where you looked so I can add it there as > well. > Thomas
Made by MHonArc.