Skip to content

Commit 3bef8df

Browse files
committed
add section why JSNIRF
1 parent 6dde565 commit 3bef8df

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,36 @@ This toolbox is selectively dependent on the below toolboxes
3232
the JSONLab toolbox http://github.com/fangq/jsonlab as well as ZMat toolbox
3333
http://github.com/fangq/zmat ; this is supported on both MATLAB and Octave.
3434

35+
## Why JSNIRF?
36+
37+
A SNIRF data file is basically an HDF5 file. HDF5 (Hierarchical Data Format version 5)
38+
is a general purpose file format for storing flexible binary data. However, it has
39+
the below limitations:
40+
41+
- it is binary, not human readable, you must use a parser to load the file
42+
and understand the content
43+
- it requires a spacial library, although widely and freely available, to load
44+
or save such file
45+
- HDF5 is a very sophisticated format; writing your own parser is quite difficult
46+
- when storing a small dataset, an HDF5 file has an overhead in file size
47+
48+
In comparison, the JSNIRF data format is defined based on the JData specification.
49+
and supports both a text-based interface and a binary interface. The text form
50+
JSNIRF file is a plain JSON file, and has various advantages
51+
52+
- JSNIRF is human readable, you can read the data using an editor
53+
- JSNIRF is very simple (because JSON format is very simple)
54+
- JSNIRF is lightweight, little overhead for storing small datasets
55+
- JSNIRF can be readily parsed by numerous free JSON parsers available
56+
- Programming your own specialized JSNIRF parser is very easy to write
57+
58+
The binary JSNIRF format uses a binary JSON format (UBJSON) which is also
59+
- quasi-human readable despite it is binary
60+
- over 20 free parsers available
61+
- easy to write your own parser because of the simplicity
62+
63+
64+
3565
## SNIRF and JSNIRF format compatibility
3666

3767
The JSNIRF data structure is highly compatible with the SNIRF data structure.

0 commit comments

Comments
 (0)