Is there in IfcOpenShell-Python already a function implemented to create from ifc ifczip and vis versa?
I did now create my own litte python script for it:
from zipfile import ZipFile, ZIP_DEFLATED
from pathlib import Path
path_ifczip = path_ifc.split(".")+'.ifczip'
with ZipFile(path_ifczip, 'w', ZIP_DEFLATED, compresslevel=9) as zip:
filesize_ifc = Path(path_ifc).stat().st_size
filesize_ifczip = Path(path_ifczip).stat().st_size
print('ifczip created: ' + path_ifczip)
print("Size of ifc is :", filesize_ifc/1000, "megabytes")
print("Size of ifczip is :", filesize_ifczip/1000, "megabytes")
with ZipFile(path_ifczip, 'r') as zip:
print('Extracting the ifc-file now...')
If there are any suggestions for improvement, please write them :D