ArrayTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Low-level Manipulation : Matrices, Vectors, and Arrays : ArrayTools : ArrayTools/Uncompress

ArrayTools

  

Uncompress

  

uncompress a byte sequence

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Uncompress(data,opts)

Parameters

data

-

ByteArray or list of integers

opts

-

(optional) equation of the form format = value

Options

• 

format : auto, gzip, zip, or zlib; specify the compression format

Description

• 

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.

• 

If format=auto (the default), 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 gzip, zip, or zlib, the specified compression format will be assumed.

Examples

Compress string data with StringTools[Compress] and uncompress.

dataStringTools:-CompressThe quick brown fox jumps over the lazy dog

data120−10011−5572854044−5176−50867242−5447−498372−53−8180−5642−51454086−564775458240174−2536868542−92−28−895100107−7415−38

(1)

ArrayTools:-Uncompressdata

8410410132113117105991073298114111119110321021111203210611710911211532111118101114321161041013210897122121321001111030

(2)

Uncompress gzipped data from a URL. Note that the Import command will uncompress and parse this data in one step.

timelinehttps://www.maplesoft.com/data/examples/dif/maple-timeline.dif.gz:

dataURL:-Gettimeline:

numelemsdata

268

(3)

uncompressedArrayTools:-Uncompressdata:

numelemsuncompressed

268

(4)

Compatibility

• 

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.

See Also

ArrayTools

ArrayTools[Compress]

FileTools[Compressed]

StringTools[Uncompress]

type/ByteArray