[SOLVED] Gzip compression

Author: ldmadalina@gmail.com (xayde)

Hi all, Does Uniface support gzip compression type? If it does, how can I compress xml files using this type of compression? Thank you!

9 Comments

  1. Yes, since 9.1.01. Various Uniface functionalities uses zip files somehow... Search "zip files" into your UnifaceLibrary or look directly for the topic "Proc for File System Management". There should also be some examples to look for in the samples section of this site. Hope it helps... Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  2. gianni said Yes, since 9.1.01. Various Uniface functionalities uses zip files somehow... Search "zip files" into your UnifaceLibrary or look directly for the topic "Proc for File System Management". There should also be some examples to look for in the samples section of this site. Hope it helps... Gianni  

      Thank you for your answer, I really appreciate it, but I have not found anything related to "gzip" compression (.gz), neither on Uniface Documentation, nor on the entire Internet . There is only information about "zip" files. If possible, could you help me with more details about "gzip" compression type?  Thank you again!!


    Author: xayde (ldmadalina@gmail.com)
  3. Hi xayde, gzip it's just a short name for "gnu zip"...so any gz file is a zip file! gzip uses Lempel-Ziv algoritm, also used in zip e pkzip. More info on http://www.gzip.org/ Use Uniface Proc instructions to generate a zip file with .gz extension. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  4. gianni said Hi xayde, gzip it's just a short name for "gnu zip"...so any gz file is a zip file! gzip uses Lempel-Ziv algoritm, also used in zip e pkzip. More info on http://www.gzip.org/ Use Uniface Proc instructions to generate a zip file with .gz extension. Gianni  

    Hello, thank you very much :-) I have tried Uniface instructions, the .gz archive is created with size 0 and it can not be opened. Of course, if I try to create .zip files, using the same code, the size is grater than 0K and the archive can be opened. How could I fix this behavior? 


    Author: xayde (ldmadalina@gmail.com)
  5. Hi xayde, probably you are trying to open the zip file with another application while it is still opened (and locked) by your Uniface application. If this is the case you can use flush or lflush instructions to close the zip file after creating it in your Uniface application. This behaviour is described into Uniface Library, see: zip files > Locking Zip files. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  6. gianni said Hi xayde, probably you are trying to open the zip file with another application while it is still opened (and locked) by your Uniface application. If this is the case you can use flush or lflush instructions to close the zip file after creating it in your Uniface application. This behaviour is described into Uniface Library, see: zip files > Locking Zip files. Gianni  

    Hi, I had another look and I have used lflush/flush but I have the same result. I compressed a file both as gzip and zip using an external tool and I have noticed that gzip archives are slightly different than zip archives even if they are based on the same algorithm. Maybe that's why the  Uniface instructions work fine for creating zip files and they don't work for creating gzip files. Can you give some clues about what should I try next? Thank you


    Author: xayde (ldmadalina@gmail.com)
  7. xayde said Hi all, Does Uniface support gzip compression type? If it does, how can I compress xml files using this type of compression? Thank you!  

    Hi, The Uniface ZIP functionality is based on the the ZIP file format that was created by Phil Katz of PKWARE (for details see https://en.wikipedia.org/wiki/Zip_(file_format)). Uniface hereby supports the PKWARE specification version 2.0 for 32-bit files (<4GB) and version 4.5 for 64-bit files (>4GB). gzip is a different archive format than the ZIP file format and therefore Uniface cannot handle it (at this moment). Hope this helps. Kind regards, Daniel Iseli Uniface Technical Support


    Author: diseli (daniel.iseli@uniface.com)
  8. Thank you very much, Daniel!


    Author: xayde (ldmadalina@gmail.com)
  9. Hi xayde, After Daniel post I looked for our production code and found we convert the Uniface zip file in a tar.gz format on Linux with the following script: mkdir tempfolder cd tempfolder unzip ../myZipFromUniface.zip tar -cvf ../myTar.tar * rm -rf * cd .. gzip myTar.tar rmdir tempfolder rm myZipFromUniface.zip When I answered I did not remember this detail. I am sorry to have provided you with wrong infos. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)