FileTools[Compressed] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : Compressed Subpackage : FileTools/Compressed/Read

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/usr/local/repository/tmp/mpldoc_slot0/mpldoc3/GZtest-yYoYxV9R

(1)

dataLinearAlgebraRandomVector100,datatype=float8

(2)

FileToolsCompressedWriteFilefile,data

800

(3)

fdFileToolsCompressedOpenfile

fd9760448

(4)

FileToolsCompressedReadfd,float8,11

−55.

(5)

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.

(6)

FileToolsCompressedClosefd

0

(7)

FileToolsRemovefile

zipfileFileToolsTemporaryFilenamecatFileToolsTemporaryDirectory,kerneloptsdirsep,GZtest-,.zip

zipfile/usr/local/repository/tmp/mpldoc_slot0/mpldoc3/GZtest-AyUYslLY.zip

(8)

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

16

(9)

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

fd1

(10)

FileToolsCompressedReadfd,string,8

A sample

(11)

FileToolsCompressedReadfd,string,8

message

(12)

FileToolsCompressedClosefd

0

(13)

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]