These plotting support files use "zlib" compression. After decompression you get an ASCII file that is more or less "human readable".
The compressed file starts with a 59 bytes long header that has nothing to do with this type of compression - it makes these files more or less proprietary. The header contains some identification strings - that is the easy part. The only obscure things remain bytes 48..55 and 56..59. They seem to be numbers related to the content (CRC?). To decompress, this whole header can be skipped. To test this, just crop the first 59 bytes from the file with an editor and use a zlib tool to decompress the "decapitated" file.
To compress, a header should be added, containing the strings like "PIAFILEVERSION..." and the numbers have to be written in it. But what numbers? I have found that AutoCAD seems to read and interpret the files without problems if the numbers are large enough - it just takes a little longer than with the calculated numbers. In my experimental tool I use this (hex) sequence FF FF FF FF FF FF FF 00 FF FF FF 00.
If you are interested, or have more info yourself, please contact me.
The compressed file starts with a 59 bytes long header that has nothing to do with this type of compression - it makes these files more or less proprietary. The header contains some identification strings - that is the easy part. The only obscure things remain bytes 48..55 and 56..59. They seem to be numbers related to the content (CRC?). To decompress, this whole header can be skipped. To test this, just crop the first 59 bytes from the file with an editor and use a zlib tool to decompress the "decapitated" file.
To compress, a header should be added, containing the strings like "PIAFILEVERSION..." and the numbers have to be written in it. But what numbers? I have found that AutoCAD seems to read and interpret the files without problems if the numbers are large enough - it just takes a little longer than with the calculated numbers. In my experimental tool I use this (hex) sequence FF FF FF FF FF FF FF 00 FF FF FF 00.
If you are interested, or have more info yourself, please contact me.
Tags: -
Related entries:
5067/39%Last update: 2006-08-27 20:18
Author: Govert
Revision: 1.3