File tree Expand file tree Collapse file tree 1 file changed +40
-3
lines changed Expand file tree Collapse file tree 1 file changed +40
-3
lines changed Original file line number Diff line number Diff line change 11# tszip
2- [ ![ Tests] ( https://github.com/tskit-dev/tszip/actions/workflows/tests.yml/badge.svg )] ( https://github.com/tskit-dev/tszip/actions/workflows/tests.yml ) [ ![ codecov] ( https://codecov.io/gh/tskit-dev/tszip/branch/main/graph/badge.svg )] ( https://codecov.io/gh/tskit-dev/tszip )
2+ [ ![ License ] ( https://img.shields.io/github/license/tskit-dev/tszip )] ( https://github.com/tskit-dev/tszip/blob/main/LICENSE ) [ ![ PyPI version ] ( https://img.shields.io/pypi/v/tszip.svg )] ( https://pypi.org/project/tszip/ ) [ ![ Supported Python Versions ] ( https://img.shields.io/pypi/pyversions/tszip.svg )] ( https://pypi.org/project/tszip/ ) [ ![ Docs Build ] ( https://github.com/tskit-dev/tszip/actions/workflows/docs.yml/badge.svg )] ( https://github.com/tskit-dev/tszip/actions/workflows/docs.yml ) [ ![ Binary wheels ] ( https://github.com/tskit-dev/tszip/actions/workflows/wheels.yml/badge.svg )] ( https://github.com/tskit-dev/tszip/actions/workflows/wheels.yml ) [ ![ Tests] ( https://github.com/tskit-dev/tszip/actions/workflows/tests.yml/badge.svg )] ( https://github.com/tskit-dev/tszip/actions/workflows/tests.yml ) [ ![ codecov] ( https://codecov.io/gh/tskit-dev/tszip/branch/main/graph/badge.svg )] ( https://codecov.io/gh/tskit-dev/tszip )
33
44Gzip-like compression for [ tskit] ( https://tskit.dev/software/tskit.html ) tree sequences.
55
6- Please see the [ documentation] ( https://tskit.dev/tszip/docs/latest/ ) for more details
7- and [ installation instructions] ( https://tskit.dev/tszip/docs/latest/installation.html ) .
6+ Please see the [ documentation] ( https://tskit.dev/tszip/docs/stable/ ) ([ latest] ( https://tskit.dev/tszip/docs/latest/ ) ) for more details
7+ and [ installation instructions] ( https://tskit.dev/tszip/docs/stable/installation.html ) .
8+
9+ ## Installation
10+
11+ Install from PyPI or conda-forge:
12+
13+ ```
14+ python -m pip install tszip
15+ # or
16+ conda install -c conda-forge tszip
17+ ```
18+
19+ ## Quickstart
20+
21+ CLI usage:
22+
23+ ``` bash
24+ # Compress a .trees file to a .tsz archive
25+ tszip data.trees
26+
27+ # Decompress back to .trees
28+ tsunzip data.trees.tsz
29+ ```
30+
31+ Along with the CLI, tszip can be used directly from Python:
32+
33+ ``` python
34+ import tskit
35+ import tszip
36+
37+ ts = tskit.load(" data.trees" )
38+ tszip.compress(ts, " data.trees.tsz" ) # write compressed archive
39+
40+ restored = tszip.load(" data.trees.tsz" ) # load handles .tsz archives and plain .trees files
41+ print (restored.equals(ts)) # True
42+ ```
43+
44+ Compression is lossless for supported tskit tree sequences.
You can’t perform that action at this time.
0 commit comments