zero_buffer is a high-performance, zero-copy, implementation of a byte-buffer for Python.
Documentation is available on ReadTheDocs.
from zero_buffer import Buffer
# Create a buffer which has space for 8192 bytes.
b = Buffer.allocate(8192)
with open(path, "rb") as f:
# Read up to 8192 bytes from the file into the buffer
b.read_from(f.fileno())
# Create a read-only view of the buffer, this performs no copying.
view = b.view()
# Split the view on colons, this returns a generator which yields sub-views
# of the view.
for part in view.split(b":"):
print(part)
zero_buffer works on Python 2.6, 2.7, 3.2, 3.3, and PyPy.
Metadata
Release files for zero_buffer 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zero_buffer-0.5.1.tar.gz | 20.3 kB | Details |
Release files / zero_buffer-0.5.1.tar.gz
| Download URL | zero_buffer-0.5.1.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1279663c463961490208d92bf30feda06542ddf5327aa16973c6bbd38386ddb
|
|
BLAKE2b-256 checksum How to use checksums |
acb23738bfa7a15e0d591d0946ca97df91e6d1fe6f3bd53d425a70f4f368befc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |