File: README.md

package info (click to toggle)
libvbz-hdf-plugin 1.0.2-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,384 kB
  • sloc: cpp: 28,289; python: 392; ansic: 40; sh: 21; makefile: 19; xml: 16
file content (27 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# pyvbz

Python bindings for `libvbz`.

## Installation

Python wheels are provided with each [release](https://github.com/nanoporetech/vbz_compression/releases) and can be install with with `pip`.

```
$ pip install https://github.com/nanoporetech/vbz_compression/releases/download/v1.0.0/pyvbz-1.0.0-cp35-cp35m-linux_x86_64.whl
```

## Example

```python
>>> import vbz
>>> import numpy as np
>>> signal = np.arange(0, 1000, dtype=np.int16)                                                         
>>> signal.nbytes                                                                                       
2000
>>> compressed = vbz.compress(signal)                                                                   
>>> compressed.nbytes                                                                                   
27
>>> recovered = vbz.decompress(compressed, dtype=np.int16)
>>> all(signal == recovered)
True
```