dennishendriksen commented on issue #1976:
URL: https://github.com/apache/fury/issues/1976#issuecomment-2639731149
same issue for long:
```java
import org.apache.fury.*;
import org.apache.fury.config.*;
public class FuryReproLong {
public static class RecordA {
private long long64 = 1L;
}
public static class RecordB {
private long long64 = Long.MAX_VALUE;
}
public static class RecordC {
private long[] longArray = {1L};
}
public static class RecordD {
private long[] longArray = {Long.MAX_VALUE};
}
public static void main(String[] args) {
Fury fury =
Fury.builder()
.withLanguage(Language.JAVA)
.withLongCompressed(true)
.withCompatibleMode(CompatibleMode.SCHEMA_CONSISTENT)
.requireClassRegistration(true)
.build();
fury.register(RecordA.class);
fury.register(RecordB.class);
fury.register(RecordC.class);
fury.register(RecordD.class);
System.out.printf("A: %d%n", fury.serialize(new RecordA()).length);
System.out.printf("B: %d%n", fury.serialize(new RecordB()).length);
System.out.printf("C: %d%n", fury.serialize(new RecordC()).length);
System.out.printf("D: %d%n", fury.serialize(new RecordD()).length);
}
}
```
results in:
```
A: 8
B: 13
C: 14 // would have expected this value to be lower
D: 14
```
I've poked around the code base to see if I can fix it myself, but this is
higher magic :)
Fixing this issue would be a major storage saver for my use case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]