Skip to content
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

Fixing flatbuffer store calculation to include prefix size #67

Merged

Conversation

sdjordjevicTT
Copy link
Contributor

We encountered an issue when storing the FlatBuffer to disk and rereading it from the saved file. The problem arose because we didn’t include the size of the prefix. The GetPrefixedSize function returns the size of the FlatBuffer, excluding the prefix size. To resolve this, I am updating the code to use GetSizePrefixedBufferLength instead. This function includes both the size of the prefix and the size of the FlatBuffer, ensuring accurate storage and retrieval.

[size prefix][flatbuffer]
|---------length--------|

Solves #43

@sdjordjevicTT sdjordjevicTT merged commit 0664b5a into main Jul 2, 2024
2 checks passed
@sdjordjevicTT sdjordjevicTT deleted the sdjordjevic/fixing_flatbuffer_store_size_calculation#43 branch August 12, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants