Dbase32
=======

The Dbase32 encoding is a base32 variant designed for document-oriented
databases, specifically for encoding document IDs.

It uses an alphabet whose symbols are in ASCII/UTF-8 sorted order::

    3456789ABCDEFGHIJKLMNOPQRSTUVWXY

This means that unlike `RFC-3548 Base32`_ encoding, the sort-order of the
encoded data will match the sort-order of the binary data.

The `dbase32 package`_ provides a high-performance `C implementation`_ of the
encoding, plus a pure-Python fallback.

Dbase32 is licensed `LGPLv3+`_, and requires `Python 3.3`_ or newer.


Examples
--------

Encoding and decoding:

>>> from dbase32 import db32enc, db32dec
>>> db32enc(b'binary foo')
'FCNPVRELI7J9FUUI'
>>> db32dec('FCNPVRELI7J9FUUI')
b'binary foo'

Validation:

>>> from dbase32 import isdb32, check_db32
>>> isdb32('../very/naughty/')
False
>>> check_db32('../very/naughty/')  # doctest: -IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  ...
ValueError: invalid Dbase32: '../very/naughty/'


Dbase32 resources
-----------------

    *   `Documentation`_
    *   `Report a bug`_
    *   `Browse the source`_
    *   `Launchpad project`_


A Novacut component
-------------------

Dbase32 is being developed as part of the `Novacut`_ project. Packages are
available for `Ubuntu`_ in the `Novacut Stable Releases PPA`_ and the
`Novacut Daily Builds PPA`_.

If you have questions or need help getting started with Dbase32, please stop
by the `#novacut`_ IRC channel on freenode.


.. _`RFC-3548 Base32`: https://tools.ietf.org/html/rfc4648
.. _`dbase32 package`: http://docs.novacut.com/dbase32/index.html
.. _`C implementation`: http://bazaar.launchpad.net/~dmedia/dbase32/trunk/view/head:/dbase32/_dbase32.c
.. _`LGPLv3+`: https://www.gnu.org/licenses/lgpl-3.0.html
.. _`Python 3.3`: https://docs.python.org/3.3/

.. _`Documentation`: http://docs.novacut.com/dbase32/index.html
.. _`Report a bug`: https://bugs.launchpad.net/dbase32
.. _`Browse the source`: http://bazaar.launchpad.net/~dmedia/dbase32/trunk/files
.. _`Launchpad project`: https://launchpad.net/dbase32

.. _`Novacut`: https://launchpad.net/novacut
.. _`Ubuntu`: http://www.ubuntu.com/
.. _`Novacut Stable Releases PPA`: https://launchpad.net/~novacut/+archive/ubuntu/stable
.. _`Novacut Daily Builds PPA`: https://launchpad.net/~novacut/+archive/ubuntu/daily
.. _`#novacut`: https://webchat.freenode.net/?channels=novacut

