Guide to RSF format |
While the header and data files are separated by default, it is also possible to pack them together into one file. To do that, specify the program's ``out'' parameter as out=stdout. Example:
bash$ sfspike n1=10 out=stdout > spike.rsf bash$ grep in spike.rsf Binary file spike.rsf matches bash$ sfin spike.rsf spike.rsf: in="stdin" esize=4 type=float form=native n1=10 d1=0.004 o1=0 label1="Time" unit1="s" 10 elements 40 bytes bash$ ls -l spike.rsf -rw-r--r-- 1 sergey users 196 2004-11-10 21:39 spike.rsfIf you examine the contents of spike.rsf, you will find that it starts with the text header information, followed by special symbols, followed by binary data.
Packing headers and data together may not be a good idea for data processing but it works well for storing data: it is easier to move the packed file around than to move two different files (header and binary) together while remembering to preserve their connection. Packing header and data together is also the current mechanism used to push RSF files through Unix pipes.