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

WIP: utilize binrw serialization/deserialization for Lead #230

Closed
wants to merge 1 commit into from

Conversation

marxin
Copy link
Contributor

@marxin marxin commented Jun 9, 2024

Hey. Recently, I've been playing with a great binary serialization and deserialization library and thought it would be cool to use it for the RPM project. What are the thoughts of the community about it?

I made a simple demonstration for the Lead struct, but I'm still struggling when it comes to more complex data like IndexData (where the content is split between The Index Entry and the actual data). I'm still working on that (jam1garner/binrw#267).

@dralley
Copy link
Collaborator

dralley commented Jun 9, 2024

To be completely honest I find the macros less straightforwards to read than the current code, which is pretty clean and not particularly complex.

name_arr[..name_size].clone_from_slice(&name.as_bytes()[..name_size]);
name_arr
})]
name: String,
Copy link
Collaborator

@dralley dralley Jun 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep the data in the lead structure identical to what was on disk, rather than storing it as a potentially modified string

What does it look like without that?

@marxin
Copy link
Contributor Author

marxin commented Jun 10, 2024

To be completely honest I find the macros less straightforwards to read than the current code, which is pretty clean and not particularly complex.

Sure, understood.

@marxin marxin closed this Jun 10, 2024
@marxin marxin deleted the wip-binrw-for-Lead branch June 10, 2024 14:41
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.

None yet

2 participants