Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/filter/base64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Base64

```{eval-rst}
.. automodule:: numcodecs.base64

.. autoclass:: Base64

.. autoattribute:: codec_id
.. automethod:: encode
.. automethod:: decode
.. automethod:: get_config
.. automethod:: from_config
```
1 change: 1 addition & 0 deletions docs/filter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ packbits
categorize
astype
shuffle
base64
```
5 changes: 5 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

## Unreleased

### Documentation

* Add the Base64 codec to the filter API reference, with an encoding and decoding example.
By {user}`Wentao Tong <tongwentao>`, {issue}`587`

(release_0.17.1)=

## 0.17.1
Expand Down
11 changes: 10 additions & 1 deletion src/numcodecs/base64.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@


class Base64(Codec):
"""Codec providing base64 compression via the Python standard library."""
"""Codec providing Base64 encoding via the Python standard library.

Examples
--------
>>> codec = Base64()
>>> codec.encode(b'hello')
b'aGVsbG8='
>>> codec.decode(b'aGVsbG8=')
b'hello'
"""

codec_id = "base64"

Expand Down
Loading