val
: if val is list
or data.frame
, the child node(s)
will be added corresponding to objects in list
or
data.frame
. If calling add.gdsn(node, name, val=NULL)
,
then a label will be added which does not have any other data except
the name and attributes. If val
is raw-type, it is interpreted
as 8-bit signed integer. storage
: the default value is storage.mode(val)
, "int"
denotes signed integer, "uint" denotes unsigned integer, 8, 16, 24,
32 and 64 denote the number of bits. "bit1" to "bit32" denote the
packed data types for 1 to 32 bits which are packed on disk, and
"sbit2" to "sbit32" denote the corresponding signed integers.
"float32" denotes single-precision number, and "float64" denotes
double-precision number. "string" represents strings of 8-bit
characters, "string16" represents strings of 16-bit characters
following UTF16 industry standard, and "string32" represents a string
of 32-bit characters following UTF32 industry standard. "folder" is
to create a folder.
valdim
: the values in data are taken to be those in the array with
the leftmost subscript moving fastest. The last entry could be ZERO.
If the total number of elements is zero, gdsfmt does not allocate
storage space. NA
is treated as 0.
compress
:
Z compression algorithm (http://www.zlib.net/) can be used to
deflate the data stored in the GDS file. "ZIP" option is equivalent
to "ZIP.def". "ZIP.fast", "ZIP.def" and "ZIP.max" correspond to
different compression levels.
To support efficient random access of Z stream, "ZIP_RA", "ZIP_RA.fast",
"ZIP_RA.def" or "ZIP_RA.max" should be specified. "ZIP_RA" option is
equivalent to "ZIP_RA.def:256K". The block size can be specified by
following colon, and "16K", "32K", "64K", "128K", "256K", "512K", "1M",
"2M", "4M" and "8M" are allowed, like "ZIP_RA:64K". The compression
algorithm tries to keep each independent compressed data block to be
about of the specified block size, like 64K.
LZ4 fast lossless compression algorithm is allowed when
compress="LZ4"
(http://code.google.com/p/lz4/). Three
compression levels can be specified, "LZ4.fast" (LZ4 fast mode),
"LZ4.hc" (LZ4 high compression mode), "LZ4.max" (maximize the
compression ratio). The block size can be specified by following colon,
and "64K", "256K", "1M" and "4M" are allowed according to LZ4 frame
format. "LZ4" is equivalent to "LZ4.hc:256K".
To support efficient random access of LZ4 stream, "LZ4_RA",
"LZ4_RA.fast", "LZ4_RA.hc" or "ZIP_RA.max" should be specified.
"LZ4_RA" option is equivalent to "LZ4_RA.hc:256K". The block size can
be specified by following colon, and "16K", "32K", "64K", "128K",
"256K", "512K", "1M", "2M", "4M" and "8M" are allowed, like
"LZ4_RA:64K". The compression algorithm tries to keep each independent
compressed data block to be about of the specified block size, like 64K.
LZMA compression algorithm (http://tukaani.org/xz/) is available
since gdsfmt_v1.7.18, which has a higher compression ratio than ZIP
algorithm. "LZMA", "LZMA.fast", "LZMA.def" and "LZMA.max" available.
To support efficient random access of LZMA stream, "LZMA_RA",
"LZMA_RA.fast", "LZMA_RA.def" and "LZMA_RA.max" can be used. The block
size can be specified by following colon. "LZMA_RA" is equivalent to
"LZMA_RA.def:256K".
To finish compressing, you should call readmode.gdsn
to
close the writing mode.
closezip
: if compression option is specified, then enter a read
mode after deflating the data. see readmode.gdsn
.
...
: if storage = "fstring"
, "fstring16"
or
"fstring32"
, users can set the max length of string in advance
by maxlen=
. If storage = "packedreal8", "packedreal16"
or
"packedreal32"
, users can define offset
and scale
to represent real numbers by ``value*scale + offset'' where ``value''
is a 8/16/32-bit integer. By default, offset=0
,
scale=0.01
for "packedreal8"
,
scale=0.0001
for "packedreal16"
,
scale=0.00001
for "packedreal24"
,
scale=0.000001
for "packedreal32"
.