Post Perception's RecordIO facsimile.
Project description
PostPerception's facsimile of Google's RecordIO library (no direct relation other than name). This is a binary format for storing sequences of arbitrary binary data, usually protocol buffers. It tolerates corruption of the underlying data and uses a CRC32 checksum to detect data corruptions. Supports Linux x86, Linux aarch64, Darwin x86, and Apple Silicon (Darwin amd64).
The core implementation is done in golang and exposed to python by wrapping
using `cgo`.
Example Usage:
```python
# Import the module.
from pp_recordio import pp_recordio as rio
FILENAME = "test.pp_recordio"
w = rio.RecordWriter(FILENAME)
w.write(b'This is a binary blob!')
w.write(b'Individual messages can be quite big.!')
w.write(b'Protocol buffers are good to store here!')
r = rio.RecordReader(FILENAME)
for item in r.read():
print(item)
```
## Technical Details
The frame is composed of a header followed by the actual data. The total frame
size is variable, depending on the size of the data being stored.
#### Frame Header Description
- Magic Number: 4 bytes; constant value: 0xDEADBEEF. Used to identify the start
of a frame.
- Length: 8 bytes; stores the total length of the frame (header + data).
- CRC32: 8 bytes; stores the CRC32 checksum of the data for integrity checking.
- Flags: 4 bytes; used to indicate various frame properties (e.g., compression).
- Reserved: 16 bytes; currently unused, reserved for future use.
4 + 8 + 8 + 4 + 16 = 40 bytes total overhead per stored datum.
## Release Notes
### Version 0.1.5
First working version.
Issues I'd like to address / fix:
- Does not tolerate corruption to the frames themselves.
- Does not support sharded paths and requires suffix to be `.pp_recordio`.
- Not thread safe.
- The underlying go library generates a ton of noisy logs. I should clean those up / remove them.
- The underlying go library has a gzip compression feature that should either be removed or exposed to the python interface.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pp_recordio-0.1.6.tar.gz.
File metadata
- Download URL: pp_recordio-0.1.6.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84fd28c3474d64b16cddb83bad7a4f78de9ea206d1a0ce259c1159b7e7bd1980
|
|
| MD5 |
1197398454c577705f113af299d5363c
|
|
| BLAKE2b-256 |
597c5fb56e4044706c4ad0ba8aa234e6300d4b155bbd20689e50208a5336a8b0
|
File details
Details for the file pp_recordio-0.1.6-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pp_recordio-0.1.6-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04034434be8f850db4c0ee6557b5cc4f4b4660dde9e398ce5290a773fb249559
|
|
| MD5 |
91b39edfb5ed44faf6c3930cd8081b52
|
|
| BLAKE2b-256 |
dfd3b943b81a3318dba0618418833e4c03d90a66d66829fc7e23ab89a3dff3dc
|