-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
Large file support #9328
Comments
I would prefer to make Int64 less awkward to work with first. I don't think the required changes are very complicated, we just need a literal syntax and adapt some |
|
The problem with Int64 is that it's not supported natively on every platform, JS being quite an important one for example. |
So on many of these platforms using Int64 will prove to be much more slower than using Float.
|
This is something I've been actually seriously considering for one of my projects, because I didn't want to introduce Int64 object allocations for JS but also didn't want to use Float directly because of fractions. I've never implemented this though, because I just used domain-specific abstract types over numbers in the end. Also modern JS has |
I agree with the Using |
I think |
The safety degrades mostly with the If we want If we don't implement
Having a new core type also comes with questions about its use in practice. Is there a Overall, I just have the feeling that we shouldn't adopt a hack just because JavaScript doesn't have real integers. It might also be confusing to users in general – a cursory search for |
Any further consideration for this? |
Ok, I suppose this remains on the back burner. I am just going to plug this here in case anyone comes across this issue looking for support for larger files. |
In order to properly support files >2GB, we need to change the signature of
seek
andtell
method forsys.io.FileInput
, using Float instead of Int, which is more easy to handle than Int64, and provides files sizes up to 9007 TB.seek() is not a problem, because passing Int will still work it might have 0 impact on user code, unless someone overrides it.
tell() will change the return type so it might break some code relying on it.
Alternative is to add seekLarge() tellLarge() operations but I don't like much people having to change their code once their hit 2GB limit.
The text was updated successfully, but these errors were encountered: