Skip to main content

Post Perception's RecordIO facimile.

Project description

PostPerception's facimile 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pp_recordio-0.1.5.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pp_recordio-0.1.5-cp310-cp310-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pp_recordio-0.1.5.tar.gz.

File metadata

  • Download URL: pp_recordio-0.1.5.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

Hashes for pp_recordio-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c8981d7d2e2fd345c9dc99ad94fbff4c9adf49662569af505d39ebfd1b5285aa
MD5 b645ef2580480d207dcf447c5159365c
BLAKE2b-256 a0c00891215a224cb16e5c392873a7525c42f5e06a0a7ac69d735e70d7d0faa0

See more details on using hashes here.

File details

Details for the file pp_recordio-0.1.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pp_recordio-0.1.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c42bdea2f4694427bcb4b7ef0685367138440b91b0790682772b8d9b0efba692
MD5 cbfbb97b31ce06479d8ce86cfe284158
BLAKE2b-256 abdbb8d101aa69a13290d768922b7e9d25680531d46d843b9f6cec672aec1a4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page