backend.globaleaks.utils.zipstream

Module Contents

Classes

ZipStream
class backend.globaleaks.utils.zipstream.ZipStream(files)[source]

Bases: object

update_data_ptr(self, data)[source]

As data is added to the archive, update a pointer so we can determine the location of various structures as they are generated.

data – data to be added to archive

Returns data

zipinfo_open(self, arcname)[source]
zipinfo_update(self, zinfo, cmpr, chunk)[source]
zipinfo_close(self, zinfo, cmpr)[source]
zip_fo(self, fo, arcname)[source]
zip_file(self, filepath, arcname)[source]

Returns data to finish off an archive based on the files already added via zip_file(…). The data returned corresponds to the fields:

[archive decryption header] [archive extra data record] [central directory] [zip64 end of central directory record] [zip64 end of central directory locator] [end of central directory record]

as described in section V. of the PKZIP Application Note: http://www.pkware.com/business_and_developers/developer/appnote/

__iter__(self)[source]