Bitstream – Binary Data for Humans

Abstract : Audiophiles are familiar with multiple digital audio file formats (WAV, MP3, AAC, ALAC, FLAC, etc.) and generally know that this multiplicity is justified by different trade-offs and features (in terms of quality, compression rate, complexity, for example). The same logic drives the research for new binary formats in many contexts. Such research goes through an experimental phase where the development of codecs – the software that transforms back and forth the original data into binary data – is required for any theoretical design. Any tool which can simplify and speed up the prototyping of such codecs therefore improves significantly this iterative process. In this context, Bitstream (Boisgérault 2017a) provides a Python library with a simple, high-level and customizable programming interface to manage binary data. Many classic but menial tasks usually required are automatically taken care of under the hood. The cornerstone of the library is the use of the " bitstream " abstraction. The " stream " part means that we use a simple model where one can only write data at one end of the binary structure and read data at the other end, in the same order. The " bit " part means that the library can work seamlessly with individual bits and not merely bytes, a feature frequently required by lossless data compression schemes. Bitstream supports out of the box data types from Python and NumPy: ASCII strings, (arrays of) booleans, fixed-size integers, floating-point numbers, etc. One can also define and register custom (even parametrized) types and their binary representation, and then use them with the same interface. Since the library supports creation and restoration of stream snapshots, it's possible to go beyond the stream model when necessary; this " time machine " scheme is more than adequate for many use cases (header lookahead, decoders with strong exception safety, etc.). And since bitstream is a Python C extension, it is fast enough for many applications.
Type de document :
Pré-publication, Document de travail
2018
Liste complète des métadonnées

Littérature citée [6 références]  Voir  Masquer  Télécharger

https://hal-mines-paristech.archives-ouvertes.fr/hal-01689565
Contributeur : Sébastien Boisgérault <>
Soumis le : lundi 22 janvier 2018 - 11:33:31
Dernière modification le : lundi 12 novembre 2018 - 11:02:47
Document(s) archivé(s) le : jeudi 24 mai 2018 - 07:07:10

Fichier

paper.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01689565, version 1

Collections

Citation

Sébastien Boisgérault. Bitstream – Binary Data for Humans. 2018. 〈hal-01689565〉

Partager

Métriques

Consultations de la notice

97

Téléchargements de fichiers

28