List Archive

Thread

Thread Index

Message

From: Torsten Paul <Torsten.Paul%gmx.de@localhost>
To: libzip-discuss%nih.at@localhost
Subject: Reading 3MF files with libzip
Date: Fri, 12 Feb 2016 20:43:39 +0100

Hi!

I'm trying to integrate reading of 3MF files (3D Manufacturing Format -
http://www.3mf.io/ / https://github.com/3MFConsortium/lib3mf) into
OpenSCAD (http://openscad.org/).

That format is basically a ZIP container with some XML files inside.
The library now has support for platforms using GCC and uses libzip
to unpack the files in that case.

I could not read some of the example files provided along with the
library and found the reason for that is that libzip says the files
are multi-disk archives. The offending files seem to be generated
on Windows 10 using the built-in 3D-Builder application.

Some more details are in the bug report I've created at the lib3mf
repo: https://github.com/3MFConsortium/lib3mf/issues/7

Basically the files have the "end of central directory" all set
to 0xff which causes libzip to produce ZIP_ER_MULTIDISK.

https://github.com/3MFConsortium/3mf-samples/tree/master/geometries

$ hd -s 0x5297 torus.3mf
00005297  50 4b 05 06 ff ff ff ff  ff ff ff ff ff ff ff ff
000052a7  ff ff ff ff 00 00

The format description is confusing enough to make me unsure if the
problem is 3D-Builder producing invalid files or libzip not picking
up the zip64 extensions that are mentioned for the case where the
disk-count/disk-number values are 0xffff (or even something totally
different).
Running unzip on those archives produces no error and just extracts
the files. Using zip -FF also complains about missing 65536 parts.

So I'm hoping someone with more insight about the ZIP format can
shed a light on that issue...

ciao,
  Torsten.

Made by MHonArc.