Bitstream -- Binary Data for Humans

Bitstream -- Binary Data for Humans - Published in JOSS (2018)

https://github.com/boisgera/bitstream

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

binary-data bitstream python
Last synced: 6 months ago · JSON representation

Repository

Binary Data for Humans

Basic Info
Statistics
  • Stars: 96
  • Watchers: 6
  • Forks: 14
  • Open Issues: 9
  • Releases: 2
Topics
binary-data bitstream python
Created almost 13 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License

README.md

Python PyPI version Downloads Mkdocs status Travis Build Status Appveyor Build status

Bitstream

A Python library to manage binary data as bitstreams.

Overview

Bitstream three main features:

  • It is easy to use since the bitstream abstraction is simple.

  • It works seamlessly at the bit and byte level.

  • It supports Python, NumPy and user-defined types.

See the documentation Overview section for more details.

Quickstart

Make sure that Python 2.7 or Python 3.6 to 3.9 are installed and that pip, NumPy and a C compiler are available, then install bitstream with

$ pip install bitstream

For more details, refer to the documentation.

Examples

First, the mandatory "Hello World!" example:

>>> from bitstream import BitStream
>>> BitStream(b"Hello World!")
010010000110010101101100011011000110111100100000010101110110111101110010011011000110010000100001

The basic API is made of three methods only:

  • stream = BitStream() to create an empty stream.

  • stream.write(data, type) to write data data of type type.

  • data = stream.read(type, n) to read n items of type type.

For example:

>>> stream = BitStream()        # <empty>
>>> stream.write(True, bool)    # 1
>>> stream.write(False, bool)   # 10
>>> from numpy import int8
>>> stream.write(-128, int8)    # 1010000000
>>> stream.write(b"AB", bytes)  # 10100000000100000101000010
>>> stream.read(bool, 2)        # 100000000100000101000010
[True, False]
>>> stream.read(int8, 1)        # 0100000101000010
array([-128], dtype=int8)
>>> stream.read(bytes, 2)       # <empty>
b'AB'

Refer to the documentation Overview section for more elementary examples.

Contributing

Refer to Contributing in the documentation.

Support

If you need some support with bitstream and you haven't found a solution to your problem in the documentation, please open an issue in the GitHub issue tracker.

If you don't feel like you problem belongs there, you can send me an e-mail instead; please include "bitstream" in the subject. You will find my e-mail address in my GitHub profile.

In both cases, you will need to sign into GitHub (and join GitHub if you don't already have an account).

License

Bitstream is open source software released under the MIT license.

Copyright (c) 2012-2023 Sébastien Boisgérault

Owner

  • Name: Sébastien Boisgérault
  • Login: boisgera
  • Kind: user
  • Location: Paris, France
  • Company: Mines Paris - PSL

JOSS Publication

Bitstream -- Binary Data for Humans
Published
January 31, 2018
Volume 3, Issue 21, Page 541
Authors
Sébastien Boisgérault ORCID
MINES ParisTech, PSL Research University, Centre for robotics
Editor
Lorena A Barba ORCID
Tags
binary data data compression audio coding

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 359
  • Total Committers: 3
  • Avg Commits per committer: 119.667
  • Development Distribution Score (DDS): 0.006
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Sébastien Boisgérault S****t@g****m 357
Nicholas Charriere n****e@g****m 1
Sébastien Diemer s****r@m****r 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 27
  • Total pull requests: 2
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 4 hours
  • Total issue authors: 12
  • Total pull request authors: 2
  • Average comments per issue: 1.7
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • boisgera (9)
  • bmcfee (8)
  • cclauss (1)
  • krejov100 (1)
  • rainey (1)
  • FlyingWolFox (1)
  • pHiney (1)
  • Kristina314 (1)
  • edupo (1)
  • gerion0 (1)
  • ismaelharunid (1)
  • onillap (1)
Pull Request Authors
  • nichochar (1)
  • sebdiem (1)
Top Labels
Issue Labels
enhancement (8) bug (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 509 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 8
  • Total versions: 50
  • Total maintainers: 1
pypi.org: bitstream

Binary Data for Humans

  • Versions: 50
  • Dependent Packages: 0
  • Dependent Repositories: 8
  • Downloads: 509 Last month
Rankings
Dependent repos count: 5.2%
Stargazers count: 7.3%
Average: 8.5%
Forks count: 9.6%
Dependent packages count: 10.0%
Downloads: 10.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements-dev.txt pypi
  • Cython * development
  • mkdocs * development
  • mkdocs-material * development
  • numpy * development
  • pyyaml * development
requirements-test.txt pypi
  • Cython * test
  • numpy * test
  • pyyaml * test
setup.py pypi
  • setuptools *
.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/pip-install.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite