ArrayTools
Uncompress
uncompress a byte sequence
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Uncompress(data,opts)
data
-
ByteArray or list of integers
opts
(optional) equation of the form format = value
format = one of auto, bzip2, gzip, zip, or zlib
This option allows a compression format to be specified explicitly. Options are auto, bzip2, gzip, zip, or zlib.
If format=auto, then Uncompress will attempt to automatically detect the compression format used and uncompress the data with the correct method. Otherwise, if format is one of bzip2, gzip, zip, or zlib, the specified compression format will be assumed. The default is auto.
The Uncompress(data) command takes the given byte array or list of integers and attempts to uncompress it. It returns a ByteArray.
If data is a list, its contents must be integers between -128 and 127.
Compress string data with StringTools[Compress] and uncompress.
data≔StringTools:-Compress⁡The quick brown fox jumps over the lazy dog
data≔120−10011−5572854044−5176−50867242−5447−498372−53−8180−5642−51454086−564775458240174−2536868542−92−28−895100107−7415−38
ArrayTools:-Uncompress⁡data
8410410132113117105991073298114111119110321021111203210611710911211532111118101114321161041013210897122121321001111030
Uncompress gzipped data from a URL. Note that the Import command will uncompress and parse this data in one step.
timeline≔https://www.maplesoft.com/data/examples/dif/maple-timeline.dif.gz:
data≔URL:-Get⁡timeline:
numelems⁡data
268
uncompressed≔ArrayTools:-Uncompress⁡data:
numelems⁡uncompressed
The ArrayTools[Uncompress] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
The ArrayTools[Uncompress] command was updated in Maple 2018.
The format option was updated in Maple 2018.
See Also
ArrayTools[Compress]
FileTools[Compressed]
StringTools[Uncompress]
type/ByteArray
Download Help Document