Read - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


FileTools[Compressed]

  

Read

  

read from a compressed file

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Read(file, type, number)

Parameters

file

-

string or integer file descriptor

type

-

string or a hardware number type to read

number

-

number of characters or numbers to read

Description

• 

The Read command reads a fixed amount of data from a file that has been opened with FileTools[Compressed][Open].

Examples

fileFileToolsTemporaryFilenameFileToolsJoinPathFileToolsTemporaryDirectory,GZtest-

file/tmp/mpldoc4/GZtest-yYoYxV9R

(1)

dataLinearAlgebraRandomVector100,datatype=float8

FileToolsCompressedWriteFilefile,data

800

(2)

fdFileToolsCompressedOpenfile

fd20128752

(3)

FileToolsCompressedReadfd,float8,11

−55.

(4)

FileToolsCompressedReadfile,float8,99

17.−35.36.71.75.47.−15.−48.−38.−80.48.−13.76.5.−2.5.92.74.−24.−28.−63.−19.−74.83.95.25.−69.27.16.83.81.38.−63.1.−25.−95.−77.−49.−24.−66.−28.−47.87.−99.77.8.−33.49.−63.−25.−1.−31.−88.64.−62.4.69.−63.−87.−34.64.81.25.65.98.51.11.51.95.−11.34.46.9.50.−43.−67.19.29.−12.96.93.−80.−92.−29.96.89.−55.−67.77.−70.13.−58.−94.−7.12.−53.21.−25.40.

(5)

FileToolsCompressedClosefd

0

(6)

FileToolsRemovefile

zipfileFileToolsTemporaryFilenamecatFileToolsTemporaryDirectory,kerneloptsdirsep,GZtest-,.zip

zipfile/tmp/mpldoc4/GZtest-AyUYslLY.zip

(7)

FileTools[Compressed][WriteFile]("sample" in zipfile, "A sample message");

16

(8)

fd := FileTools[Compressed][Open]("sample" in zipfile,'mode'=READ);

fd1

(9)

FileToolsCompressedReadfd,string,8

A sample

(10)

FileToolsCompressedReadfd,string,8

message

(11)

FileToolsCompressedClosefd

0

(12)

FileToolsRemovezipfile

Compatibility

• 

The FileTools[Compressed][Read] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

FileTools[Compressed]

FileTools[Compressed][Close]

FileTools[Compressed][Open]

FileTools[Compressed][Write]

FileTools[Compressed][WriteFile]

FileTools[Remove]