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

Binary Files #16

Open
wants to merge 84 commits into
base: main
Choose a base branch
from
Open

Binary Files #16

wants to merge 84 commits into from

Conversation

ZynoXelek
Copy link
Contributor

Save maps as binary files to use less memory. (It is way better than strings !)
We will store uint8 for colors.
And we will use custom floating storage : 5 exponent sign (From 2⁻¹⁶ to 2¹⁵) + 19 bits mantissa for a total of 24 bits (3 bytes) with values being the offset from the lowest value stored at the beginning.

Don't forget a leading byte telling which structure is stored in this file.

@ZynoXelek ZynoXelek marked this pull request as draft July 3, 2024 19:23
@ZynoXelek
Copy link
Contributor Author

ZynoXelek commented Jul 4, 2024

We may also want to save the seed used for the generation in one of the binary files.

@BlueNZ BlueNZ marked this pull request as ready for review August 7, 2024 19:22
@BlueNZ
Copy link
Collaborator

BlueNZ commented Aug 7, 2024

Works on basic examples, may need to be tested on cross platform (C-Python) bigger examples.

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