質問

This is a theoretical question. This could be accomplished in any language but I am using python at the moment. I want to make a zip archive that will to expand to a rather large amount of repeating data. Is it possible to create a zip file that will expand to a predictable number of characters? For instance, if I zip file that will expand to foo.txt and contain the data aaaaaaaa, how difficult would it be to modify it so the resulting foo.txt will contain 10 letter a's, or more? Can this be accomplished in python without any external libraries?

役に立ちましたか?

解決

Look to the implementation of zipstream, specifically, zip_file. I believe you a can quickly modify the code there to generate a file that's roughly what you're looking for.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top