ZLIB File Format - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Formats : Formats/ZLIB

ZLIB File Format

zlib file format

 

Description

Notes

Examples

References

Description

• 

ZLIB is a data compression format, used primarily for in-transit data rather than file storage.

• 

The Import command can encode and decode data in this format, and the ArrayTools[Compress] and ArrayTools[Uncompress] commands also support it.

• 

The zlib compression algorithm is taken from the zlib library written by Jean-loup Gailly and Mark Adler. See http://zlib.net.

Notes

• 

Content-Type: application/zlib

Examples

Write some data directly to a ByteArray in zlib format.

dataExportThe quick brown fox jumped over the lazy dog,target=direct,format=ZLIB

data120−10011−5572854044−5176−50867242−5447−498372−53−8180−5642−5145727781−5647754582401−54−2536868542−92−28−8930107−1091648

(1)

Read the data back and uncompress it.

arrImportdata,source=direct,format=ZLIB

arr841041013211311710599107329811411111911032102111120321061171091121011003211111810111432116104101321089712212132100111103

(2)

Retrieve the original message.

StringTools:-FromByteArrayarr

The quick brown fox jumped over the lazy dog

(3)

References

  

[RFC6713] Levine, J., The 'application/zlib' and 'application/gzip' Media Types, RFC 6713, August 2012.

See Also

ArrayTools[Compress]

Formats