7
7
- ** Zero dependencies** (optionally
8
8
[ ` scijs/ndarray ` ] ( https://github.com/scijs/ndarray ) )
9
9
- Runs natively in ** Node** , ** Browsers** , and ** Deno** (ESM)
10
- - Supports ** v2** or ** v3** protocols, C & F-order arrays, and diverse
11
- data-types
10
+ - Supports ** v2** or ** v3** protocols, C & F-order arrays, diverse data-types,
11
+ and [ ZEP2 Sharding ] ( https://zarr.dev/zeps/draft/ZEP0002.html )
12
12
- Allows flexible ** storage** backends and ** compression** codecs
13
13
- Provides rich, in-editor ** type information** via
14
14
[ template literal types] ( https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html )
17
17
18
18
``` javascript
19
19
import * as zarr from " zarrita" ;
20
- import { FetchStore } from " @zarrita/storage" ;
21
20
22
- const store = new FetchStore (" http://localhost:8080/data.zarr" );
21
+ const store = new zarr. FetchStore (" http://localhost:8080/data.zarr" );
23
22
const arr = await zarr .open (store, { kind: " array" }); // zarr.Array<DataType, FetchStore>
24
23
25
24
// read chunk
@@ -36,6 +35,8 @@ const full = await get(arr); // ndarray.Ndarray<Int32Array>
36
35
const region = await get (arr, [null , zarr .slice (6 )]);
37
36
```
38
37
38
+ Read [ the documentation] ( https://manzt.github.io/zarrita.js ) to learn more.
39
+
39
40
### Zarr building blocks
40
41
41
42
zarrita's API is almost entirely tree-shakeable, meaning users are able to pick
@@ -116,3 +117,14 @@ pnpm install
116
117
pnpm build
117
118
pnpm test
118
119
```
120
+
121
+ The tests are run with [ Vitest] ( https://github.com/vitest-dev/vitest ) , which is
122
+ a Node.js test runner. To try our a development version of ** zarrita** in the
123
+ browser, run ` pnpm build ` and start a web-server in the root of the repository:
124
+
125
+ ``` sh
126
+ python3 -m http.server .
127
+ # navigate to localhost:8000
128
+ ```
129
+
130
+ You can edit the contents of ` index.html ` and refresh the page.
0 commit comments