@@ -4,7 +4,7 @@ zarr - Persistence
4
4
This document describes the file organisation and formats used to save zarr
5
5
arrays on disk.
6
6
7
- All data and metadata associated with a zarr array is stored within a
7
+ All data and metadata associated with a zarr array are stored within a
8
8
directory on the file system. Within this directory there are a number
9
9
of files and sub-directories storing different components of the data
10
10
and metadata. Here I'll refer to a directory containing a zarr array
@@ -23,7 +23,7 @@ Mandatory fields and allowed values are as follows:
23
23
24
24
* ``shape `` - list of integers - the size of each dimension of the array
25
25
* ``chunks `` - list of integers - the size of each dimension of a chunk, i.e., the chunk shape
26
- * ``dtype `` - string or list of lists - a description of the data type, following Numpy convention
26
+ * ``dtype `` - string - a description of the data type, following Numpy convention
27
27
* ``fill_value `` - scalar value - value to use for uninitialised portions of the array
28
28
* ``cname `` - string - name of the compression library used
29
29
* ``clevel `` - integer - compression level
@@ -60,7 +60,7 @@ metadata associated with the array, i.e., user attributes. The format
60
60
of this file is JSON.
61
61
62
62
For example::
63
-
63
+
64
64
>>> import zarr
65
65
>>> z = zarr.open('example.zarr', mode='w', shape=(1000000, 1000),
66
66
... chunks=(10000, 100), dtype='i4', fill_value=42,
@@ -69,16 +69,20 @@ For example::
69
69
>>> z.attrs['bar'] = 4.2
70
70
>>> z.attrs['baz'] = 'quux'
71
71
>>> print(open('example.zarr/__zattr__').read())
72
-
73
- TODO add results above
72
+ {
73
+ "bar": 4.2,
74
+ "baz": "quux",
75
+ "foo": 42
76
+ }
74
77
75
78
Array data
76
79
----------
77
80
78
81
Within a root directory, a sub-directory called "__zdata__" contains
79
82
the array data. The array data is divided into chunks, each of which
80
- is compressed using the [blosc meta-compression library](TODO). Each
81
- chunk is stored in a separate file.
83
+ is compressed using the `blosc meta-compression library
84
+ <https://github.com/blosc/c-blosc> `_. Each chunk is stored in a
85
+ separate file.
82
86
83
87
The chunk files are named according to the chunk indices. E.g., for a
84
88
2-dimensional array with shape (100, 100) and chunk shape (10, 10)
@@ -101,8 +105,8 @@ header is organised as follows::
101
105
| +----------blosclz version
102
106
+--------------blosc version
103
107
104
- For more details on the header, see the [C-Blosc header
105
- description]( https://github.com/Blosc/c-blosc/blob/master/README_HEADER.rst) .
108
+ For more details on the header, see the ` c-blosc header description
109
+ < https://github.com/Blosc/c-blosc/blob/master/README_HEADER.rst> `_ .
106
110
107
111
If a file does not exist on the file system for any given chunk in an
108
112
array, that indicates the chunk has not been initialised, and the
0 commit comments