Skip to main content

zs2decode is a Python (2.7, 3.4 - current) implementation of a decoder for Zwick zs2 files.

zs2 files contain measurements and meta data. zs2decode is able to parse these files. It contains support functions to output the result as text file or XML for further processing. The following script converts a zs2 file into XML:

import zs2decode.parser
import zs2decode.util

zs2_file_name = 'my_data_file.zs2'
xml_output_file = 'my_data_file.xml'

# load and decompress file
data_stream = zs2decode.parser.load(zs2_file_name)
# separate binary data stream into chunks
raw_chunks = zs2decode.parser.data_stream_to_chunks(data_stream)
# convert binary chunk data into lists of Python objects
chunks = zs2decode.parser.parse_chunks(raw_chunks)
# output as text file
with open(xml_output_file, 'wb') as f:
    f.write( zs2decode.util.chunks_to_XML(chunks) )

An example script to extract measurement time series from the XML is provided in the examples folder.

Documentation is available at http://zs2decode.readthedocs.org/ and source code at https://github.com/cpetrich/zs2decode.git.

Metadata

Release files for zs2decode 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zs2decode 0.3.3
File Size Uploaded
zs2decode-0.3.3.tar.gz 42.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zs2decode 0.3.3
File Interpreter ABI Platform
zs2decode-0.3.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 62.1 kB

Release files / zs2decode-0.3.3.tar.gz

Download URL zs2decode-0.3.3.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
372a3b4cf52adfdf1fe9d09cb47fa9993c8d962c71f9e315e791a19232a9986d
BLAKE2b-256 checksum
How to use checksums
0230626e40b090eb5f97692dbc6f8b6070eac1a07b53e38515afe0f8f1df5faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / zs2decode-0.3.3-py2.py3-none-any.whl

Download URL zs2decode-0.3.3-py2.py3-none-any.whl
Size 19.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a89cad6be7fb14e6a87ab4c805b6dc19a5d248617186f917c1079846488154a9
BLAKE2b-256 checksum
How to use checksums
32f3395cf608e8750216be2ea3e1eb68446cb2b3aa1233083232cd7a3a2817ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page