chaokunyang commented on code in PR #3115:
URL: https://github.com/apache/fory/pull/3115#discussion_r2673113736
##########
java/fory-core/src/main/java/org/apache/fory/serializer/ArraySerializers.java:
##########
@@ -488,13 +488,26 @@ public int[] read(MemoryBuffer buffer) {
public static final class LongArraySerializer extends
PrimitiveArraySerializer<long[]> {
+ // Each element is encoded using variable-length encoding, which is more
space-efficient
+ // for arrays containing many small values.
+ private boolean supportVarLenEncoding;
+
public LongArraySerializer(Fory fory) {
- super(fory, long[].class);
+ this(fory, false);
+ }
+
+ public LongArraySerializer(Fory fory, boolean supportVarLenEncoding) {
Review Comment:
ForyConfig has `compressIntArray` and `compressLongArray` options, how about
use that directly, and for LongArraySerializer, we compress based on
`LongEncoding`
--
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]