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

Unsigned Lists #325

Open
AnakinRaW opened this issue Aug 12, 2023 · 3 comments
Open

Unsigned Lists #325

AnakinRaW opened this issue Aug 12, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@AnakinRaW
Copy link
Member

In .NET we have the problem that lists can only be indexed by int32 values. Many alamo models, or at least MEG, allow uint table indexes.

Currently we limit our model implementations to only allow int32.

I already implemented a UnsignedList which should be able to solve the problem, but i'm not sure whether we should use it or not. At least for MEG i think we can be 100% sure we never get an archive with int32.Max + 1 files.

@gruenwaldlk
Copy link
Member

IIRC all formats use unsigned integers for index tables and the like but I'm not sure just how likely it is to even have more than int32.Max entries. For a first usable version I think it should be fine as long as the overflow is handled properly.

This would also mean feature parity with the currently released libraries so those can be replaced with a release relatively soon and a future update could then add the unsigned support if necessary.

@gruenwaldlk gruenwaldlk added the enhancement New feature or request label Aug 12, 2023
@AnakinRaW
Copy link
Member Author

AnakinRaW commented Aug 12, 2023

the current implementations (for MEG) only accept int32 type. and negative values throw an exceptions.

Since the public models/interfaces do not expose these kind of access anyway, this is an implementation details which could be changed anytime.

Idk for .alo files where it might be more usual to acutally use uint values.

@gruenwaldlk
Copy link
Member

gruenwaldlk commented Aug 12, 2023

The DAT refactoring I did should be in line with any MEG changes in that regard, so for those formats we should be good for the time being.

Adding to your concern, chunk-files in general could be an issue, maybe @andrewfullard or @inertials-revenge have a better grasp of how large chunked file indexes etc. can grow?

@gruenwaldlk gruenwaldlk added this to the Backlog milestone Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants