Zip64Mode enumeration

Zip64Mode enumeration

Specifies when to use ZIP64 format extensions for OOXML files.

OOXML file is a ZIP-archive that has a 4 GB (2^32 bytes) limit on uncompressed size of a file, compressed size of a file, and total size of the archive, as well as a limit of 65,535 (2^16-1) files in archive. ZIP64 format extensions increase the limits to 2^64.


NEVERDo not use ZIP64 format extensions.
IF_NECESSARYIf necessary use ZIP64 format extensions.
ALWAYSAlways use ZIP64 format extensions.


Shows how to use ZIP64 format extensions.

builder = DocumentBuilder()
for i in range(0, 10000):
    bmp = Bitmap(5, 5)
    g = Graphics.from_image(bmp)
    g.clear(Color.from_argb(random.randint(0, 254), random.randint(0, 254), random.randint(0, 254)))
    data = io.BytesIO(), ImageFormat.bmp)

options = OoxmlSaveOptions()
options.zip_64_mode = Zip64Mode.ALWAYS + "OoxmlSaveOptions.Zip64ModeOption.docx")

See Also