https://github.com/borud/recio
RecordIO - A trivial library for writing records to a writer.
https://github.com/borud/recio
Last synced: 25 days ago
JSON representation
RecordIO - A trivial library for writing records to a writer.
- Host: GitHub
- URL: https://github.com/borud/recio
- Owner: borud
- License: apache-2.0
- Created: 2022-12-03T17:41:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-05T13:34:39.000Z (over 3 years ago)
- Last Synced: 2024-06-20T10:23:01.179Z (almost 2 years ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RecordIO
[](https://pkg.go.dev/github.com/borud/recio)
This library implements a simple `Reader` and `Writer` pair for length prefixed records. This is suitable for writing serialized data records to a disk file. The datastream consists of unsigned 32 bit integer (little endian) indicating the length of a payload, followed by the payload itself.
When using this you have to make sure to give record sizes some thought. When you read records you want the supplied buffer to be large enough to hold the messages you are reading. If your target buffer isn't large enough you will get an `ErrTargetBufferTooSmall` error.