A simple file-backed proto with an in-memory cache.
- Caches proto in RAM after first read for performance.
- Uses a checksum to verify integrity of data.
- Leverages modern Abseil error handling and memory management.
#include "protostore/file-storage.h"
#include "protostore/proto-data-store.h"
FileStorage storage;
ProtoDataStore<TestProto> pds(storage, testfile);
MyProto myproto;
myproto.set_value("hi");
absl::Status result = pds.Write(myproto);
if (!result.ok()) // error handling
This library is a C++ implementation from the same origin as Jetpack DataStore. Unlike that library, it does not support concurrent writes and the on-disk format is incompatible.