Skip to content

Commit aa7eb3b

Browse files
committed
Add section on buffer protocol support
1 parent eb5bea0 commit aa7eb3b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

_posts/2019-05-02-zarr-2.3-release.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,22 @@ adapter](https://zarr.readthedocs.io/en/stable/api/n5.html#zarr.n5.N5Store)
138138
which allows reading and writing of data on disk in the N5
139139
format.
140140

141+
## Support of the buffer protocol
142+
143+
The Python buffer protocol for those that are familiar is a specification for
144+
how to share large blocks of memory between different libraries without
145+
copying. This protocol has evolved over time from its original introduction in
146+
Python 2 and later revamped implementation added in Python 3 (with backports to
147+
Python 2.6 and 2.7). Due to the changes in its behavior from Python 2 to Python
148+
3 and what objects supported which parts of the buffer protocol, it was a bit
149+
challenging to leverage effectively in Zarr. This despite the value of having
150+
zero-copy when storing data or performing filtering and compression.
151+
152+
Thanks to some under-the-hood changes in Numcodecs 0.6.0 and Zarr 2.3, the
153+
buffer protocol is now cleanly supported for Python 2/3 in both libraries when
154+
working with data. In addition to improved memory handling and performance,
155+
this should make it easier for users developing their own stores, compressors,
156+
and filters to use with Zarr.
141157

142158
## Future developments
143159

0 commit comments

Comments
 (0)