Open
Description
https://pkg.go.dev/github.com/hashicorp/raft#SnapshotMeta
I am implementing (not for the first time) my own Snapshot Store in rqlite. I am reading a Snapshot data from an uncompressed source, but would like to compress it on the fly when a Snapshot it the data is read from the io.ReadCloser
returned by Snapshot store.Open().
Since the source data is not itself compressed, but compressed bytes will be served by the io.ReadCloser
, I do not know the size of the Snapshot data ahead of time. This forces me to compress the data first in a scratch area.
Any ideas for avoiding this?