About XFDL
When an XFDL file indicates asci-gzip (sometimes spelled asc-gzip), it can be misleading:
What it actually means in XFDL practice
asci→ ASCII-encoded (almost always Base64)gzip→ historical / generic label, not always literal GZIP format
In many real-world XFDL files:
- The data is Base64-encoded
- The compressed payload is raw DEFLATE, not a full GZIP file
So the pipeline is often:
XML
↓ (deflate compression — raw, no gzip header)
compressed bytes
↓ (Base64 encoding)
ASCII text (asci-gzip)
Why the confusion exists
- Early tooling and specs loosely used “gzip” to refer to the deflate algorithm
- True GZIP format includes:
- Header
- Optional filename/comment
- CRC/footer
- Many XFDL files omit the GZIP container and use deflate only
Practical implication
- If you try to treat
asci-gzipas a real.gzfile, it may fail - You often need:
- Base64 decode
- Inflate (deflate decompression) — not gunzip
How this relates to Chilkat
XfdlToXmlhandles this automatically- If doing manually, you’d typically use:
Decode→ Base64 → bytesInflateStringENCor equivalent → deflate decompress
Key takeaway
In XFDL, “asci-gzip” often means Base64 + raw deflate, not a true GZIP file format.
That naming inconsistency is historical and unfortunately pretty common in XFDL ecosystems.