-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
DOCS: Rework Portable storage format example #8323
DOCS: Rework Portable storage format example #8323
Conversation
1b51a00
to
f50601f
Compare
Why is this in DRAFT status? It needs merging as the current doc is inaccurate. |
I agree, I was waiting to see if anyone was going to double-check my work, since posting a example that is wrong twice would be embarrassing. Would you be willing to? |
docs/PORTABLE_STORAGE.md
Outdated
``` | ||
01 11 01 01 01 01 02 01 // Signature | ||
01 // Version | ||
14 // Varint size of section (5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the size of the section, it's the count of section entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest looks reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated PR with your suggestions. Thanks!
@jtgrassie pointed out that the example I provided was colored incorrectly. He also made the good point that the image wasn't easy to review/correct. I reworked the example so that it's text-only. It's easier to review and edit, and reveals the structure better in my opinion. Also this is easier for people who can't distinguish colors as easily. Make sure to double-check this work because there's a decent chance I screwed up the comments. The actual byte data was generated and should be solid.
f50601f
to
564fa30
Compare
@selsta Before you merge, I am going to double check one thing with portable storage format: bool arrays. In c++ there is a specialization for |
@jeffro256 ok, please comment here when I can re-add it to the merge queue. |
@selsta Okay we're good! |
You can double check results with this code:
Put easylogging++ and epee folders in current directory, then compile with: Produces output: |
This is merely an example of why I wrote the following in the original document:
(and also why I don't see the value of the JSON example) |
@jtgrassie pointed out that the example I provided was colored incorrectly. He also made the good point that the image wasn't easy to review/correct. I reworked the example so that it's text-only. It's easier to review and edit, and reveals the structure better in my opinion. Also this is easier for people who can't distinguish colors as easily.
Make sure to double-check this work because there's a decent chance I screwed up the comments. The actual byte data was generated and should be solid. I'm also very open to suggestions about changing the style or structure.