Hi Paul,

In the current version of BaseX, new archives cannot be streamed to files.

I think we could propagate the file output stream to archive:create and other functions. This could potentially be financed as sponsored feature. Does Boeing support open source projects?

Best,
Christian




Han (US), Paul P <Paul.P.Han@boeing.com> schrieb am Sa., 25. Mai 2019, 00:10:

Hello,

 

We encountered Out Of Main Memory when trying to create archive of a 4GB XML file.  I’m using version BaseX922.war.  We allocated 20GB with –Xmx flag for tomcat. Please let me know if there is a way to overcome this issue.

 

            let $files := file:list('/tmp', false(), '4gb.xml')

            let $zip := archive:create($files ! element archive:entry { . }, file:read-binary('/tmp/4gb.xml'))

            return file:write-binary('4gb.xml.zip', $zip)

 

 

Thanks,

Paul