Jean-Paul Calderone wrote:
>
> If you mmap a tar file, then you'll get a bunch of tar formatted stuff.
> If
> you mmap a gzipped tar file, then you'll get a bunch of gzipped stuff.
> Are
> you sure that's what you want? From your code snippet, it looks more like
> you want the uncompressed file data from the archive. In this case, you
> cannot meaningfully use mmap to speed up your application. The data has
> to be uncompressed and interpreted before you can get the application
> data.
>
Actually, I want the contents of the tar uncompressed and untarred. So, for
example, I might be working with image data that has to go through several
transformations. I essentially want to pull the image out of the gz'ed tar
and into memory so I can work on it (as a file) and later write the changed
contents to somewhere else. But I don't really want to uncompress/untar and
save the file to disk and then work on it, I want to load it right into
memory. mmap seemed to be the right idea here...
Thanks for the reply,
Chris
--
View this message in context:
http://www.nabble.com/memory-mapped-tar-file-contents-tp20473925p20475639.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list