summaryrefslogtreecommitdiffstats
path: root/develop/_view_tools_convert.html
blob: 34f350007fb06a726f847d9524d0849e0a7422ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HDF5: Command-line Tools For Converting HDF5 Files</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="hdf5doxy.css" rel="stylesheet" type="text/css">
<!-- <link href="hdf5doxy.css" rel="stylesheet" type="text/css"/>
 -->
<script type="text/javascript" src="hdf5_navtree_hacks.js"></script>
</head>
<body>
<div style="background:#FFDDDD;font-size:120%;text-align:center;margin:0;padding:5px">Please, help us to better serve our user community by answering the following short survey:  <a href="https://www.hdfgroup.org/website-survey/">https://www.hdfgroup.org/website-survey/</a></div>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="HDFG-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="https://www.hdfgroup.org">HDF5</a>
   &#160;<span id="projectnumber">1.15.0.68e8c0e</span>
   </div>
   <div id="projectbrief">API Reference</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('_view_tools_convert.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div><div class="header">
  <div class="headertitle"><div class="title">Command-line Tools For Converting HDF5 Files</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Navigate back: <a class="el" href="index.html">Main</a> / <a class="el" href="_getting_started.html">Getting Started with HDF5</a> / <a class="el" href="_view_tools_command.html">Command-line Tools</a> </p><hr  />
<h1><a class="anchor" id="secViewToolsConvertTOC"></a>
Contents</h1>
<ul>
<li>
<a class="el" href="#secViewToolsConvertASCII">Output HDF5 Dataset into an ASCII File (to Import into Excel and Other Applications)</a> </li>
<li>
<a class="el" href="#secViewToolsConvertBinary">Output HDF5 Dataset into Binary File</a> </li>
<li>
<a class="el" href="#secViewToolsConvertExport">Export from h5dump and Import into HDF5</a> </li>
</ul>
<h1><a class="anchor" id="secViewToolsConvertASCII"></a>
Output HDF5 Dataset into an ASCII File (to Import into Excel and Other Applications)</h1>
<p>The <code style="background-color:whitesmoke;">h5dump</code> utility can be used to convert an HDF5 dataset into an ASCII file, which can then be imported into Excel and other applications. The following options are used: </p><table class="doxtable">
<tr>
<th>Options</th><th>Description  </th></tr>
<tr>
<td>-d D, &ndash;dataset=D  </td><td>Display dataset D   </td></tr>
<tr>
<td>-o F, &ndash;output=F  </td><td>Output raw data into file F   </td></tr>
<tr>
<td>-y, &ndash;noindex  </td><td>Suppress printing of array indices with the data   </td></tr>
<tr>
<td>-w N, &ndash;width=N  </td><td>Set N number of columns of output. A value of 0 sets the number to 65535 (the maximum)   </td></tr>
</table>
<p>As an example, <code style="background-color:whitesmoke;">h5_crtdat.c</code> from the <a class="el" href="_l_b_dset_create.html">Creating a Dataset</a> HDF5 Tutorial topic, creates the file <code style="background-color:whitesmoke;">dset.h5</code> with a dataset <code style="background-color:whitesmoke;">/dset</code> that is a 4 x 6 integer array. The following is displayed when viewing <code style="background-color:whitesmoke;">dset.h5</code> with <code style="background-color:whitesmoke;">h5dump</code>: </p><div class="fragment"><div class="line">$ h5dump dset.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;dset.h5&quot;</span> {</div>
<div class="line">GROUP <span class="stringliteral">&quot;/&quot;</span> {</div>
<div class="line">   DATASET <span class="stringliteral">&quot;dset&quot;</span> {</div>
<div class="line">      DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">      DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">      DATA {</div>
<div class="line">      (0,0): 1, 2, 3, 4, 5, 6,</div>
<div class="line">      (1,0): 7, 8, 9, 10, 11, 12,</div>
<div class="line">      (2,0): 13, 14, 15, 16, 17, 18,</div>
<div class="line">      (3,0): 19, 20, 21, 22, 23, 24</div>
<div class="line">      }</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="ttc" id="agroup___p_d_t_s_t_d_html_ga37e8a6be7ee64587c2a282b965019bb8"><div class="ttname"><a href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div><div class="ttdeci">#define H5T_STD_I32BE</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:305</div></div>
</div><!-- fragment --><p>The following command will output the values of the <code style="background-color:whitesmoke;">/dset</code> dataset to the ASCII file <code style="background-color:whitesmoke;">dset.asci</code>: </p><div class="fragment"><div class="line">h5dump -d /dset -o dset.asci -y -w 50 dset.h5</div>
</div><!-- fragment --><p>In particular, note that: </p><ul>
<li>The default behavior of <code style="background-color:whitesmoke;">h5dump</code> is to print indices, and the <code style="background-color:whitesmoke;">-y</code> option suppresses this. </li>
<li>The <code style="background-color:whitesmoke;">-w 50</code> option tells <code style="background-color:whitesmoke;">h5dump</code> to allow 50 columns for outputting the data. The value specified must be large enough to accommodate the dimension size of the dataset multiplied by the number of positions and spaces needed to print each value. If the value is not large enough, the output will wrap to the next line, and the data will not display as expected in Excel or other applications. To ensure that the output does not wrap to the next line, you can also specify 0 (zero) for the <code style="background-color:whitesmoke;">-w</code> option.</li>
</ul>
<p>In addition to creating the ASCII file <code style="background-color:whitesmoke;">dset.asci</code>, the above command outputs the metadata of the specified dataset: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">&quot;dset.h5&quot;</span> {</div>
<div class="line">DATASET <span class="stringliteral">&quot;/dset&quot;</span> {</div>
<div class="line">   DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">   DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">   DATA {</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>The <code style="background-color:whitesmoke;">dset.asci</code> file will contain the values for the dataset: </p><div class="fragment"><div class="line">1, 2, 3, 4, 5, 6,</div>
<div class="line">7, 8, 9, 10, 11, 12,</div>
<div class="line">13, 14, 15, 16, 17, 18,</div>
<div class="line">19, 20, 21, 22, 23, 24</div>
</div><!-- fragment --><h1><a class="anchor" id="secViewToolsConvertBinary"></a>
Output HDF5 Dataset into Binary File</h1>
<p>The <code style="background-color:whitesmoke;">h5dump</code> utility can be used to convert an HDF5 dataset to a binary file with the following options: </p><table class="doxtable">
<tr>
<th>Options</th><th>Description  </th></tr>
<tr>
<td>-d D, &ndash;dataset=D  </td><td>Display dataset D   </td></tr>
<tr>
<td>-o F, &ndash;output=F  </td><td>Output raw data into file F   </td></tr>
<tr>
<td>-b B, &ndash;binary=B  </td><td>Binary file output of form B. Valid values are: LE, BE, NATIVE, FILE   </td></tr>
</table>
<p>As an example, <code style="background-color:whitesmoke;">h5_crtdat.c</code> from the <a class="el" href="_l_b_dset_create.html">Creating a Dataset</a> HDF5 Tutorial topic, creates the file dset.h5 with a dataset <code style="background-color:whitesmoke;">/dset</code> that is a 4 x 6 integer array. The following is displayed when viewing <code style="background-color:whitesmoke;">dset.h5</code> with <code style="background-color:whitesmoke;">h5dump</code>: </p><div class="fragment"><div class="line">$ h5dump -d /dset/ dset.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;dset.h5&quot;</span> {</div>
<div class="line">DATASET <span class="stringliteral">&quot;/dset/&quot;</span> {</div>
<div class="line">   DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">   DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">   DATA {</div>
<div class="line">   (0,0): 1, 2, 3, 4, 5, 6,</div>
<div class="line">   (1,0): 7, 8, 9, 10, 11, 12,</div>
<div class="line">   (2,0): 13, 14, 15, 16, 17, 18,</div>
<div class="line">   (3,0): 19, 20, 21, 22, 23, 24</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>As specified by the <code style="background-color:whitesmoke;">-d</code> and <code style="background-color:whitesmoke;">-o</code> options, the following <code style="background-color:whitesmoke;">h5dump</code> command will output the values of the dataset <code style="background-color:whitesmoke;">/dset </code>to a file called <code style="background-color:whitesmoke;">dset.bin</code>. The <code style="background-color:whitesmoke;">-b</code> option specifies that the output will be binary in Little Endian format (LE).</p>
<div class="fragment"><div class="line">h5dump -d /dset -b LE -o dset.bin dset.h5</div>
</div><!-- fragment --><p>This command outputs the metadata for the dataset, as well as creating the binary file <code style="background-color:whitesmoke;">dset.bin</code>: </p><div class="fragment"><div class="line">HDF5 <span class="stringliteral">&quot;dset.h5&quot;</span> {</div>
<div class="line">DATASET <span class="stringliteral">&quot;/dset&quot;</span> {</div>
<div class="line">   DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">   DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">   DATA {</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>If you look at the resulting <code style="background-color:whitesmoke;">dset.bin</code> file with a binary editor, you will see that it contains the dataset's values. For example (on Linux) you will see: </p><div class="fragment"><div class="line">$ od -t d dset.bin</div>
<div class="line">0000000           1           2           3           4</div>
<div class="line">0000020           5           6           7           8</div>
<div class="line">0000040           9          10          11          12</div>
<div class="line">0000060          13          14          15          16</div>
<div class="line">0000100          17          18          19          20</div>
<div class="line">0000120          21          22          23          24</div>
<div class="line">0000140</div>
</div><!-- fragment --><h1><a class="anchor" id="secViewToolsConvertExport"></a>
Export from h5dump and Import into HDF5</h1>
<p>The <code style="background-color:whitesmoke;">h5import</code> utility can use the output of <code style="background-color:whitesmoke;">h5dump</code> as input to create a dataset or file.</p>
<p>The <code style="background-color:whitesmoke;">h5dump</code> utility must first create two files: </p><ul>
<li>A DDL file, which will be used as an <code style="background-color:whitesmoke;">h5import</code> configuration file </li>
<li>A raw data file containing the data to be imported</li>
</ul>
<p>The DDL file must be generated with the <code style="background-color:whitesmoke;">h5dump -p</code> option, to generate properties.</p>
<p>The raw data file that can be imported into HDF5 using this method may contain either numeric or string data with the following restrictions: </p><ul>
<li>Numeric data requires the use of the <code style="background-color:whitesmoke;">h5dump -b</code> option to produce a binary data file. </li>
<li>String data must be written with the <code style="background-color:whitesmoke;">h5dump -y</code> and <code style="background-color:whitesmoke;">&ndash;width=1</code> options, generating a single column of strings without indices.</li>
</ul>
<p>Two examples follow: the first imports a dataset with a numeric datatype. Note that numeric data requires the use of the <code style="background-color:whitesmoke;">h5dump -b</code> option to produce a binary data file. The example program (<code style="background-color:whitesmoke;">h5_crtdat.c</code>) that creates this file is included with the <a class="el" href="_intro_h_d_f5.html">Introduction to HDF5</a> tutorial and can be obtained from the <a class="el" href="_l_b_examples.html">Examples from Learning the Basics</a> page: </p><div class="fragment"><div class="line">h5dump -p -d <span class="stringliteral">&quot;/dset&quot;</span> --ddl=dsetbin.dmp -o dset.bin -b dset.h5</div>
<div class="line">h5import dset.bin -c dsetbin.dmp -o <span class="keyword">new</span>-dset.h5</div>
</div><!-- fragment --><p>The output before and after running these commands is shown below: </p><div class="fragment"><div class="line">$  h5dump dset.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;dset.h5&quot;</span> {</div>
<div class="line">GROUP <span class="stringliteral">&quot;/&quot;</span> {</div>
<div class="line">   DATASET <span class="stringliteral">&quot;dset&quot;</span> {</div>
<div class="line">      DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">      DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">      DATA {</div>
<div class="line">      (0,0): 1, 2, 3, 4, 5, 6,</div>
<div class="line">      (1,0): 7, 8, 9, 10, 11, 12,</div>
<div class="line">      (2,0): 13, 14, 15, 16, 17, 18,</div>
<div class="line">      (3,0): 19, 20, 21, 22, 23, 24</div>
<div class="line">      }</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="line">$ h5dump -p -d <span class="stringliteral">&quot;/dset&quot;</span> --ddl=dsetbin.dmp -o dset.bin -b dset.h5</div>
<div class="line"> </div>
<div class="line">$ h5import dset.bin -c dsetbin.dmp -o new-dset.h5</div>
<div class="line"> </div>
<div class="line">$ h5dump new-dset.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;new-dset.h5&quot;</span> {</div>
<div class="line">GROUP <span class="stringliteral">&quot;/&quot;</span> {</div>
<div class="line">   DATASET <span class="stringliteral">&quot;dset&quot;</span> {</div>
<div class="line">      DATATYPE  <a class="code hl_define" href="group___p_d_t_s_t_d.html#ga37e8a6be7ee64587c2a282b965019bb8">H5T_STD_I32BE</a></div>
<div class="line">      DATASPACE  SIMPLE { ( 4, 6 ) / ( 4, 6 ) }</div>
<div class="line">      DATA {</div>
<div class="line">      (0,0): 1, 2, 3, 4, 5, 6,</div>
<div class="line">      (1,0): 7, 8, 9, 10, 11, 12,</div>
<div class="line">      (2,0): 13, 14, 15, 16, 17, 18,</div>
<div class="line">      (3,0): 19, 20, 21, 22, 23, 24</div>
<div class="line">      }</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
</div><!-- fragment --><p>The second example imports string data. The example program that creates this file can be downloaded from the <a class="el" href="_ex_a_p_i.html">Examples by API</a> page.</p>
<p>Note that string data requires use of the <code style="background-color:whitesmoke;">h5dump -y</code> option to exclude indexes and the <code style="background-color:whitesmoke;">h5dump &ndash;width=1</code> option to generate a single column of strings. The <code style="background-color:whitesmoke;">-o</code> option outputs the data into an ASCII file. </p><div class="fragment"><div class="line">h5dump -p -d <span class="stringliteral">&quot;/DS1&quot;</span> -O vlstring.dmp -o vlstring.ascii -y --width=1 h5ex_t_vlstring.h5</div>
<div class="line">h5import vlstring.ascii -c vlstring.dmp -o <span class="keyword">new</span>-vlstring.h5</div>
</div><!-- fragment --><p>The output before and after running these commands is shown below: </p><div class="fragment"><div class="line">$ h5dump h5ex_t_vlstring.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;h5ex_t_vlstring.h5&quot;</span> {</div>
<div class="line">GROUP <span class="stringliteral">&quot;/&quot;</span> {</div>
<div class="line">   DATASET <span class="stringliteral">&quot;DS1&quot;</span> {</div>
<div class="line">      DATATYPE  <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa">H5T_STRING</a> {</div>
<div class="line">         STRSIZE <a class="code hl_define" href="_h5_tpublic_8h.html#a5185e14efde13b48249fe391324331bc">H5T_VARIABLE</a>;</div>
<div class="line">         STRPAD <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a3f73f8dae99444798f5efd7d2d2a5e5c">H5T_STR_SPACEPAD</a>;</div>
<div class="line">         CSET <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a>;</div>
<div class="line">         CTYPE <a class="code hl_define" href="group___p_d_t_s.html#ga7f6b6959fefe56d2e871659110936d2d">H5T_C_S1</a>;</div>
<div class="line">      }</div>
<div class="line">      DATASPACE  SIMPLE { ( 4 ) / ( 4 ) }</div>
<div class="line">      DATA {</div>
<div class="line">      (0): <span class="stringliteral">&quot;Parting&quot;</span>, <span class="stringliteral">&quot;is such&quot;</span>, <span class="stringliteral">&quot;sweet&quot;</span>, <span class="stringliteral">&quot;sorrow.&quot;</span></div>
<div class="line">      }</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line">$ h5dump -p -d <span class="stringliteral">&quot;/DS1&quot;</span> -O vlstring.dmp -o vlstring.ascii -y --width=1 h5ex_t_vlstring.h5</div>
<div class="line"> </div>
<div class="line">$ h5import vlstring.ascii -c vlstring.dmp -o new-vlstring.h5</div>
<div class="line"> </div>
<div class="line">$ h5dump new-vlstring.h5</div>
<div class="line">HDF5 <span class="stringliteral">&quot;new-vlstring.h5&quot;</span> {</div>
<div class="line">GROUP <span class="stringliteral">&quot;/&quot;</span> {</div>
<div class="line">   DATASET <span class="stringliteral">&quot;DS1&quot;</span> {</div>
<div class="line">      DATATYPE  <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa">H5T_STRING</a> {</div>
<div class="line">         STRSIZE <a class="code hl_define" href="_h5_tpublic_8h.html#a5185e14efde13b48249fe391324331bc">H5T_VARIABLE</a>;</div>
<div class="line">         STRPAD <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13">H5T_STR_NULLTERM</a>;</div>
<div class="line">         CSET <a class="code hl_enumvalue" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a>;</div>
<div class="line">         CTYPE <a class="code hl_define" href="group___p_d_t_s.html#ga7f6b6959fefe56d2e871659110936d2d">H5T_C_S1</a>;</div>
<div class="line">      }</div>
<div class="line">      DATASPACE  SIMPLE { ( 4 ) / ( 4 ) }</div>
<div class="line">      DATA {</div>
<div class="line">      (0): <span class="stringliteral">&quot;Parting&quot;</span>, <span class="stringliteral">&quot;is such&quot;</span>, <span class="stringliteral">&quot;sweet&quot;</span>, <span class="stringliteral">&quot;sorrow.&quot;</span></div>
<div class="line">      }</div>
<div class="line">   }</div>
<div class="line">}</div>
<div class="ttc" id="a_h5_tpublic_8h_html_a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663"><div class="ttname"><a href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a></div><div class="ttdeci">@ H5T_CSET_ASCII</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:95</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa"><div class="ttname"><a href="_h5_tpublic_8h.html#a071841985f647f69516dbe77d93167f2a2de5d7919fe54466b7cf6a6c0b4265fa">H5T_STRING</a></div><div class="ttdeci">@ H5T_STRING</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:35</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_a5185e14efde13b48249fe391324331bc"><div class="ttname"><a href="_h5_tpublic_8h.html#a5185e14efde13b48249fe391324331bc">H5T_VARIABLE</a></div><div class="ttdeci">#define H5T_VARIABLE</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:207</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13"><div class="ttname"><a href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a23c685afc240bbac4da23b36d8fd7e13">H5T_STR_NULLTERM</a></div><div class="ttdeci">@ H5T_STR_NULLTERM</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:120</div></div>
<div class="ttc" id="a_h5_tpublic_8h_html_ad2ab726f3bd28222a2ffb91c6bbc3514a3f73f8dae99444798f5efd7d2d2a5e5c"><div class="ttname"><a href="_h5_tpublic_8h.html#ad2ab726f3bd28222a2ffb91c6bbc3514a3f73f8dae99444798f5efd7d2d2a5e5c">H5T_STR_SPACEPAD</a></div><div class="ttdeci">@ H5T_STR_SPACEPAD</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:122</div></div>
<div class="ttc" id="agroup___p_d_t_s_html_ga7f6b6959fefe56d2e871659110936d2d"><div class="ttname"><a href="group___p_d_t_s.html#ga7f6b6959fefe56d2e871659110936d2d">H5T_C_S1</a></div><div class="ttdeci">#define H5T_C_S1</div><div class="ttdef"><b>Definition</b> H5Tpublic.h:476</div></div>
</div><!-- fragment --><hr  />
<p> Navigate back: <a class="el" href="index.html">Main</a> / <a class="el" href="_getting_started.html">Getting Started with HDF5</a> / <a class="el" href="_view_tools_command.html">Command-line Tools</a> </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>