[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Using zipfile to reduce in-memory usage?



>> I'm wondering about use the zipfile module to compress the images
>> _in memory_ (using a cstringio file-like object for the zip
>> 'file').
>>
>
> Just use zlib to compress each individual image data instead of
> messing around with strngio objects or a file.

Thanks to everyone who responded. I've got a few ideas to try. I was so focused on the zipfile idea I hadn't considered zlib. I may just go with Jacob's point and see how it goes with uncompressed images and test the app in a low-memory environment. If it isn't an issue then I shouldn't have anything to worry about.

-Pat
www.gamesinmind.com