Is there a Python library that packs binary data into one file?
John Hunter
jdhunter at ace.bsd.uchicago.edu
Mon Apr 26 17:27:30 EDT 2004
>>>>> "Jacob" == Jacob H <jacobsmail at postmark.net> writes:
Jacob> Hello all, Today I began writing a utility script that
Jacob> takes given binary files and puts them all into one
Jacob> datafile. My idea is to be able to access any binary data I
Jacob> want by indexing the datafile, e.g. wanted_image_data =
Jacob> datafileobj[IMAGE_DATA]. The purpose is to hide external
Jacob> image files from the user in a simple game I'm writing.
Jacob> Though I have a good idea of how to implement this, before
Jacob> I begin I am curious to know if some Python master out
Jacob> there has already come out with a library that does the
Jacob> same. Anyone? :) --
How about putting it into a tar file? There are many archive file
formats (ISO9960, tar, zip). You could just reuse one of these and an
existing python interface to them, compressing and encrypting as
necessary if you need extra obscurity.
JDH
More information about the Python-list
mailing list