|
4 | 4 |
|
5 | 5 | - Copyright: (C) Qianqian Fang (2019-2022) <q.fang at neu.edu> |
6 | 6 | - License: Apache License, Version 2.0 |
7 | | -- Version: 0.4.4 |
| 7 | +- Version: 0.5.0 |
8 | 8 | - URL: https://github.com/NeuroJSON/pyjdata |
9 | 9 |
|
10 | 10 | [](https://travis-ci.com/fangq/pyjdata) |
@@ -39,6 +39,7 @@ Dependencies: |
39 | 39 | * (optional) **bjdata**: PIP: run `pip install bjdata` or `sudo apt-get install python3-bjdata`, see https://pypi.org/project/bjdata/, only needed to read/write BJData/UBJSON files |
40 | 40 | * (optional) **lz4**: PIP: run `pip install lz4`, only needed when encoding/decoding lz4-compressed data |
41 | 41 | * (optional) **backports.lzma**: PIP: run `sudo apt-get install liblzma-dev` and `pip install backports.lzma` (needed for Python 2.7), only needed when encoding/decoding lzma-compressed data |
| 42 | +* (optional) **blosc2**: PIP: run `pip install blosc2`, only needed when encoding/decoding blosc2-compressed data |
42 | 43 |
|
43 | 44 | Replacing `pip` by `pip3` if you are using Python 3.x. If either `pip` or `pip3` |
44 | 45 | does not exist on your system, please run |
@@ -101,6 +102,16 @@ newdata=jd.load('test.json') |
101 | 102 | newdata |
102 | 103 | ``` |
103 | 104 |
|
| 105 | +PyJData supports multiple N-D array data compression/decompression methods (i.e. codecs), similar |
| 106 | +to HDF5 filters. The currently supported filters include `zlib`, `gzip`, `lz4`, `lzma`, and various |
| 107 | +`blosc2` compression methods, including `blosc2blosclz`, `blosc2lz4`, `blosc2lz4hc`, `blosc2zlib`, |
| 108 | +`blosc2zstd`. To apply a selected compression method, one simply set `{'compression':'method'}` as |
| 109 | +the option to `jdata.encode` or `jdata.save` function; `jdata.load` or `jdata.decode` automatically |
| 110 | +decompress the data based on the `_ArrayZipType_` annotation present in the data. Only `blosc2` |
| 111 | +compression methods support multi-threading. To set the thread number, one should define a `nthread` |
| 112 | +value in the option for both encoding and decoding. |
| 113 | + |
| 114 | + |
104 | 115 | ## Utility |
105 | 116 |
|
106 | 117 | One can convert from JSON based data files (`.json, .jdt, .jnii, .jmsh, .jnirs`) to binary-JData |
|
0 commit comments