Close
Close window
Uncompress - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

ArrayTools

Uncompress

uncompress a byte sequence

Calling Sequence

Uncompress(data,opts)

Parameters

data

-

ByteArray or list of integers

opts

-

(optional) equation of the form format = value

Options

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.

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.

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.

The format option was updated in Maple 2018.


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /