This repository was archived by the owner on Jan 26, 2026. It is now read-only.
#14 - Implement 2-Byte Field IDs and Update Directory Entry Structure#35
Merged
agavra merged 3 commits intoimprint-serde:mainfrom Jun 7, 2025
Merged
Conversation
agavra
approved these changes
Jun 7, 2025
Contributor
agavra
left a comment
There was a problem hiding this comment.
Thanks for the contribution @hemantkrsh - this looks good to me.
Contributor
|
Benchmark failed for permissions to post on the PR: Here is your content converted into true Markdown, with proper escaping removed and formatting corrected: 📊 Benchmark Comparison ReportThis pull request includes Criterion benchmarks comparing performance to the The table below shows relative ratios and timing stats for each benchmark group: ✅ Benchmarks completed successfully. 🧠 Notes:
Reported by the benchmark CI bot Let me know if you'd like it formatted for a specific platform like GitHub or for inline use elsewhere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement 2-Byte Field IDs and Update Directory Entry Structure
This PR addresses issue #14 by implementing support for 2-byte Field IDs and consequently updating the
DirectoryEntrystructure. These changes provide greater flexibility for defining fields and optimize the storage of directory entries.Key Changes:
types.rs:DirectoryEntrystruct has been modified to accommodate the new 2-byte Field IDs.get_valueandget_raw_bytesfunctions withinImprintRecordimpl to correctly handle the Field ID size.ops.rs:projectfunction signature within theProjecttrait has been updated to reflect changes related to Field ID size.Projecttrait has been modified accordingly to handle the new Field ID size.should_project_subset_of_fieldshas been updated to reflect the new Field ID size.serde.rs:DIR_ENTRY_BYTEShas been updated to reflect the new size of aDirectoryEntry(now 7 bytes, including the 2-byte Field ID).ReadandWriteimplementations forDirectoryEntryhave been modified to correctly serialize and deserialize the new 7-byte format, including the 2-byte Field ID.writer.rs:BTreeMapwithin theImprintWriterstruct and its implementation has been changed tou16..README.mdandFORMAT.md:README.mdandFORMAT.mdhas been updated to reflect that theDirectoryEntrysize is now 7 bytes.These changes ensure that the data structures and serialization/deserialization logic correctly handle 2-byte Field IDs and the revised
DirectoryEntryformat, while also updating the documentation to reflect the change.