readmode.gdsn: Switch to read mode in the compression settings

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gdsfmt-main.r

Description

Switch to read mode for a GDS node with respect to its compression settings.

Usage

1

Arguments

node

an object of class gdsn.class, a GDS node

Details

After the compressed data field is created, it is in writing mode. Users can add new data to the compressed data field, but can not read data from the data field. Users have to call readmode.gdsn to finish writing, before reading any data from the compressed data field.

Once switch to the read mode, users can not add more data to the data field. If users would like to append more data or modify the data field, please call compression.gdsn(node, compress="") to decompress data first.

Value

Return node.

Author(s)

Xiuwen Zheng

References

http://github.com/zhengxwen/gdsfmt

See Also

compression.gdsn, add.gdsn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# cteate a GDS file
f <- createfn.gds("test.gds")

# commom types
n <- add.gdsn(f, "int", val=1:100, compress="ZIP")

# you can not read the variable "int" because of writing mode
# read.gdsn(n)

readmode.gdsn(n)

# now you can read "int"
read.gdsn(n)

closefn.gds(f)


# delete the temporary file
unlink("test.gds", force=TRUE)

gdsfmt documentation built on May 2, 2019, 4:41 p.m.