-
Notifications
You must be signed in to change notification settings - Fork 823
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
Change type (int->long) of field total in class Output return int #142
Comments
From romixlev on October 19, 2013 00:18:07 Can you elaborate a bit? Why do you want it to be changed to long? Is is the only method whose signature should be changed or do you see more of those? |
From [email protected] on October 22, 2013 03:49:12 I implemented the save data from the database to a file. When saving, I show the number of recorded objects and the size of the serialized data. |
From romixlev on October 22, 2013 05:03:30 OK. I understand your point now. But if you look at different JDK stream classes (DataOutputStream, InputStream, etc), they all use "int" for returning the number of available bytes and so on. And they all wrap around Integer.MAX_VALUE. So, we are simply following the JDK way of doing things at the moment. And I'm not sure that it makes a lot of sense to make Kryo IO streams different from other streams... |
From [email protected] on October 22, 2013 05:22:11 In InputStream int is used for quantities that don't exceed the 2GB limit. DataOutputStream.size() returning int is a VERY bad design decision in my opinion. I'd suggest not copying bad design decisions from the JDK. |
From [email protected] on October 22, 2013 06:05:51 Changing Input/Output#total to long is probably fine for Kryo. |
From [email protected] on October 18, 2013 11:33:21
What steps will reproduce the problem?
int output.total()
What is the expected output? What do you see instead?
long output.total()
What version of the Kryo are you using?
2.22
Original issue: http://code.google.com/p/kryo/issues/detail?id=142
The text was updated successfully, but these errors were encountered: