472,141 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,141 software developers and data experts.

Re: memory mapped tar file contents


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-...p20475639.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Nov 13 '08 #1
0 1263

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Peter Nolan | last post: by
16 posts views Thread by Justin Lazanowski | last post: by
18 posts views Thread by jacob navia | last post: by
13 posts views Thread by Samshayam | last post: by
12 posts views Thread by Clement | last post: by
1 post views Thread by Chris Brooks | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.