ZLIB File Format
zlib file format
Description
Notes
Examples
References
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.
Content-Type: application/zlib
Write some data directly to a ByteArray in zlib format.
data≔Export⁡The quick brown fox jumped over the lazy dog,target=direct,format=ZLIB
data≔120−10011−5572854044−5176−50867242−5447−498372−53−8180−5642−5145727781−5647754582401−54−2536868542−92−28−8930107−1091648
Read the data back and uncompress it.
arr≔Import⁡data,source=direct,format=ZLIB
arr≔841041013211311710599107329811411111911032102111120321061171091121011003211111810111432116104101321089712212132100111103
Retrieve the original message.
StringTools:-FromByteArray⁡arr
The quick brown fox jumped over the lazy dog
[RFC6713] Levine, J., The 'application/zlib' and 'application/gzip' Media Types, RFC 6713, August 2012.
See Also
ArrayTools[Compress]
Formats
Download Help Document