-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question on decoding large data structures #576
Comments
We've had streaming decoding come up in a few other scenarios, particularly CRLs. Random access to data which doesn't fit in memory is a different matter though. I'd suggest only using the That's the best I can offer for now. We may at least make the streaming decoding case easier soon in order to support CRLs. |
I suggest something like: pub struct Ephemeris<'a> {
pub spline_duration_s: f64,
/// Cow::Owned Vec<Spline<'a>>
/// Cow::Borrowed &'a [Spline<'a>]
pub splines: Cow<'a, [Spline<'a>]>,
} So each Owned |
As of #1725 there is now |
Hi there,
I'm trying to use ASN1 to store a large data set (up to 200 MB or so). This in replacement of a file that is currently packed struct stored as bytes to disk. I was wondering if you had any hints on the best approach to do this.
The data I have is an "ephemeris" which stores several "splines." Before starting the encoding, I do not know how many splines I'll need to encode/decode, but it could be several thousands. The reference file I'm using defines that length up front and then libraries perform a direct access to the correct spline (there's a specific algorithm on how to retrieve the correct spline number from some input information, and then seeking through the file is sufficient to grab the data).
In an attempt to mimic this behavior, I'm trying the following structure:
And the following encoding and decoding implementations (the encoding works, but the decoding fails)
Question
splines
field to point to the decoded splines?Appendix
For reference, here is how a spline is defined, where
x,y,z
are encoded as OctetStrings.Thanks for your help
The text was updated successfully, but these errors were encountered: